Examples of AbstractFileName


Examples of org.apache.commons.vfs2.provider.AbstractFileName

     * @return A FileObject in the FileSystem.
     * @throws FileSystemException if an error occurs.
     */
    public FileObject createFileSystem(final String rootUri) throws FileSystemException
    {
        final AbstractFileName rootName =
            new VirtualFileName(rootUri, FileName.ROOT_PATH, FileType.FOLDER);
        final VirtualFileSystem fs = new VirtualFileSystem(rootName, null);
        addComponent(fs);
        return fs.getRoot();
    }
View Full Code Here

Examples of org.apache.commons.vfs2.provider.AbstractFileName

            final List<ZipFileObject> strongRef = new ArrayList<ZipFileObject>(getZipFile().size());
            final Enumeration<? extends ZipEntry> entries = getZipFile().entries();
            while (entries.hasMoreElements())
            {
                final ZipEntry entry = entries.nextElement();
                final AbstractFileName name = (AbstractFileName) getFileSystemManager().resolveName(getRootName(),
                    UriParser.encode(entry.getName()));

                // Create the file
                ZipFileObject fileObj;
                if (entry.isDirectory() && getFileFromCache(name) != null)
                {
                    fileObj = (ZipFileObject) getFileFromCache(name);
                    fileObj.setZipEntry(entry);
                    continue;
                }

                fileObj = createZipFileObject(name, entry);
                putFileToCache(fileObj);
                strongRef.add(fileObj);
                fileObj.holdObject(strongRef);

                // Make sure all ancestors exist
                // TODO - create these on demand
                ZipFileObject parent;
                for (AbstractFileName parentName = (AbstractFileName) name.getParent();
                     parentName != null;
                     fileObj = parent, parentName = (AbstractFileName) parentName.getParent())
                {
                    // Locate the parent
                    parent = (ZipFileObject) getFileFromCache(parentName);
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.