Examples of FileNotFolderException


Examples of org.apache.commons.vfs2.FileNotFolderException

                children = file.getChildren();
            }
            // VFS-210
            catch (FileNotFolderException e)
            {
                throw new FileNotFolderException(getName(), e);
            }

            final String[] childNames = new String[children.length];
            for (int i = 0; i < children.length; i++)
            {
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

        synchronized (fs)
        {
            // VFS-210
            if (!getFileSystem().hasCapability(Capability.LIST_CHILDREN))
            {
                throw new FileNotFolderException(name);
            }

            /* VFS-210
            if (!getType().hasChildren())
            {
                throw new FileSystemException("vfs.provider/list-children-not-folder.error", name);
            }
            */
            attach();

            // Use cached info, if present
            if (children != null)
            {
                return resolveFiles(children);
            }

            // allow the filesystem to return resolved children. e.g. prefill type for webdav
            FileObject[] childrenObjects;
            try
            {
                childrenObjects = doListChildrenResolved();
                children = extractNames(childrenObjects);
            }
            catch (FileSystemException exc)
            {
                // VFS-210
                throw exc;
            }
            catch (Exception exc)
            {
                throw new FileSystemException("vfs.provider/list-children.error", new Object[]{name}, exc);
            }

            if (childrenObjects != null)
            {
                return childrenObjects;
            }

            // List the children
            final String[] files;
            try
            {
                files = doListChildren();
            }
            catch (FileSystemException exc)
            {
                // VFS-210
                throw exc;
            }
            catch (Exception exc)
            {
                throw new FileSystemException("vfs.provider/list-children.error", new Object[]{name}, exc);
            }

            if (files == null)
            {
                // VFS-210
                // honor the new doListChildren contract
                // return null;
                throw new FileNotFolderException(name);
            }
            else if (files.length == 0)
            {
                // No children
                children = EMPTY_FILE_ARRAY;
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

    {
        try
        {
            if (doGetType() != FileType.FOLDER)
            {
                throw new FileNotFolderException(getName());
            }
        }
        catch (Exception ex)
        {
            throw new FileNotFolderException(getName(), ex);
        }


        try
        {
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

                        }
                    }
                }
                return vfs.toArray(new WebdavFileObject[vfs.size()]);
            }
            throw new FileNotFolderException(getName());
        }
        catch (FileNotFolderException fnfe)
        {
            throw fnfe;
        }
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

                return false;
            }
        }
        catch (FileNotFoundException fse)
        {
            throw new FileNotFolderException(name);
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

    @Override
    protected String[] doListChildren() throws Exception
    {
        if (this.doGetType() != FileType.FOLDER)
        {
            throw new FileNotFolderException(this);
        }

        final FileStatus[] files = this.hdfs.listStatus(this.path);
        final String[] children = new String[files.length];
        int i = 0;
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

    {
        try
        {
            if (doGetType() != FileType.FOLDER)
            {
                throw new FileNotFolderException(getName());
            }
        }
        catch (Exception ex)
        {
            throw new FileNotFolderException(getName(), ex);
        }


        try
        {
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

                        }
                    }
                }
                return vfs.toArray(new WebdavFileObject[vfs.size()]);
            }
            throw new FileNotFolderException(getName());
        }
        catch (FileNotFolderException fnfe)
        {
            throw fnfe;
        }
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

                return false;
            }
        }
        catch (FileNotFoundException fse)
        {
            throw new FileNotFolderException(name);
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs2.FileNotFolderException

                children = file.getChildren();
            }
            // VFS-210
            catch (FileNotFolderException e)
            {
                throw new FileNotFolderException(getName(), e);
            }

            final String[] childNames = new String[children.length];
            for (int i = 0; i < children.length; i++)
            {
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.