Examples of resolveFile()


Examples of org.apache.commons.vfs.FileObject.resolveFile()

        folder.resolveFile("dir1").delete(Selectors.SELECT_ALL);
        names.remove("dir1");
        assertSameFileSet(names, folder.getChildren());

        // Delete a child file
        folder.resolveFile("file1.html").delete(Selectors.SELECT_ALL);
        names.remove("file1.html");
        assertSameFileSet(names, folder.getChildren());

        // Recreate the folder
        folder.delete(Selectors.SELECT_ALL);
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.resolveFile()

        String uri = "tgz:" + tarFilePath + "!/test.tgz";
        final FileObject tarFile = manager.resolveFile(uri);

        // Now build the nested file system
        final FileObject nestedFS = manager.createFileSystem(tarFile);
        return nestedFS.resolveFile("/");
    }
}
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.resolveFile()

        String uri = "tbz2:" + tarFilePath + "!/test.tbz2";
        final FileObject tarFile = manager.resolveFile(uri);

        // Now build the nested file system
        final FileObject nestedFS = manager.createFileSystem(tarFile);
        return nestedFS.resolveFile("/");
    }
}
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.resolveFile()

        String uri = "tar:" + tarFilePath + "!/test.tar";
        final FileObject tarFile = manager.resolveFile(uri);

        // Now build the nested file system
        final FileObject nestedFS = manager.createFileSystem(tarFile);
        return nestedFS.resolveFile("/");
    }
}
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.resolveFile()

   */
  public FileObject getFile() throws IOException {
    if (file == null) {
            FileObject root = getFileObject("");
            String stripLeadingSlash = DAVUtilities.stripLeadingSlash(getRelativePath());
      file = root.resolveFile(stripLeadingSlash, NameScope.DESCENDENT_OR_SELF);
      if (file == null) {
        throw new IOException("Could not create file object.");
      }
    }
    return file;
View Full Code Here

Examples of org.apache.commons.vfs.FileSystem.resolveFile()

            fs = doCreateFileSystem(rootName, fileSystemOptions);
            addFileSystem(rootName, fs);
        }

        // Locate the file
        return fs.resolveFile(name.getPath());
    }

    /**
     * Creates a {@link FileSystem}.  If the returned FileSystem implements
     * {@link VfsComponent}, it will be initialised.
View Full Code Here

Examples of org.apache.commons.vfs.FileSystem.resolveFile()

        // Create an empty file system, then link in the base folder
        final FileSystem newFs = manager.createVirtualFileSystem("vfs:").getFileSystem();
        final String junctionPoint = "/some/dir";
        newFs.addJunction(junctionPoint, baseFolder);

        return newFs.resolveFile(junctionPoint);
    }
}
View Full Code Here

Examples of org.apache.commons.vfs.FileSystem.resolveFile()

                // final FileName rootName =
                //    new BasicFileName(rootUrl, FileName.ROOT_PATH);
                fs = new UrlFileSystem(rootName, fileSystemOptions);
                addFileSystem(key, fs);
            }
            return fs.resolveFile(url.getPath());
        }
        catch (final MalformedURLException e)
        {
            throw new FileSystemException("vfs.provider.url/badly-formed-uri.error", uri, e);
        }
View Full Code Here

Examples of org.apache.commons.vfs.FileSystem.resolveFile()

            filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath(), properties);
            addFileSystem(this, filesystem);
        }

        // Find the file
        return filesystem.resolveFile(path);
    }

    public Collection getCapabilities()
    {
        return DefaultLocalFileProvider.capabilities;
View Full Code Here

Examples of org.apache.commons.vfs.FileSystem.resolveFile()

    {
        final FileSystem fs = getManager().createVirtualFileSystem("vfs://").getFileSystem();
        final FileObject baseDir = getBaseDir();

        // Make sure the file at the junction point and its ancestors do not exist
        FileObject file = fs.resolveFile("/a/b");
        assertFalse(file.exists());
        file = file.getParent();
        assertFalse(file.exists());
        file = file.getParent();
        assertFalse(file.exists());
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.