Package com.caucho.vfs

Examples of com.caucho.vfs.Path.mkdirs()


 
  private void init(InputStream is)
    throws IOException
    {
    Path dir = WorkDir.getLocalWorkDir();
    dir.mkdirs();
   
    Path path = dir.createTempFile("git", "tmp");

    try {
      WriteStream os = path.openWrite();
View Full Code Here


        throw new IOException(L.l("File '{0}' already exists.", _newPath));

      Path parent = _newPath.getParent();

      if (! parent.exists())
        if (! parent.mkdirs())
          throw new IOException(L.l("Unable to create path '{0}'. Check permissions.", parent));

      if (! path.renameTo(_newPath)) {
        WriteStream out = null;
View Full Code Here

        while ((entry = zis.getNextEntry()) != null) {
          String name = entry.getName();
          Path path = tempDir.lookup(name);

          if (entry.isDirectory())
            path.mkdirs();
          else {
            long length = entry.getSize();
            long lastModified = entry.getTime();
            path.getParent().mkdirs();
View Full Code Here

  private Path writeTempFile(Node node)
    throws IOException
  {
    Path workDir = CauchoSystem.getWorkPath().lookup("_xsl");
    workDir.mkdirs();
   
    // Path temp = workDir.createTempFile("tmp", "xsl");

    WriteStream os = Vfs.lookup("null:").openWrite();
    Crc64Stream crcStream = new Crc64Stream(os.getSource());
View Full Code Here

    Path path = env.lookupPwd(dirname);
   
    try {
      if (recursive)
        return path.mkdirs();
      else
        return path.mkdir();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
     
View Full Code Here

    Path path = env.lookupPwd(dirname);

    try {
      if (recursive)
        return path.mkdirs();
      else
        return path.mkdir();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
View Full Code Here

  public static FileInputOutput tmpfile(Env env)
  {
    try {
      Path tmp = env.getTempDirectory();

      tmp.mkdirs();

      Path file = tmp.createTempFile("resin", "tmp");

      env.addCleanup(new RemoveFile(file));
View Full Code Here

  private Path writeTempFile(Node node)
    throws IOException
  {
    Path workDir = CauchoSystem.getWorkPath().lookup("_xsl");
    workDir.mkdirs();
   
    // Path temp = workDir.createTempFile("tmp", "xsl");

    WriteStream os = Vfs.lookup("null:").openWrite();
    Crc64Stream crcStream = new Crc64Stream(os.getSource());
View Full Code Here

  {
    PrintWriter pw = response.getWriter();

    Path path = Vfs.lookup("/home/ferg/majordomo/archive/resin-interest.0006");
    Path dst = Vfs.lookup("/tmp/dst");
    dst.mkdirs();

    ReadStream is = path.openRead();
    try {
      parseMail(is, dst);
    } finally {
View Full Code Here

      else if (filename != null) {
        String contentType = (String) ms.getAttribute("content-type");

        Path tempDir = CauchoSystem.getWorkPath().lookup("form");
        try {
          tempDir.mkdirs();
        } catch (IOException e) {
        }
        Path tempFile = tempDir.createTempFile("form", ".tmp");
        request.addCloseOnExit(tempFile);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.