Package org.apache.commons.vfs

Examples of org.apache.commons.vfs.FileSystemException


     */
    public void addJunction(final String junctionPoint,
                            final FileObject targetFile)
        throws FileSystemException
    {
        throw new FileSystemException("vfs.provider/junctions-not-supported.error", rootName);
    }
View Full Code Here


    /**
     * Removes a junction from this file system.
     */
    public void removeJunction(final String junctionPoint) throws FileSystemException
    {
        throw new FileSystemException("vfs.provider/junctions-not-supported.error", rootName);
    }
View Full Code Here

            client = resource.retrieveSessionInstance();
            client.setHttpConnectionManager(new WebdavConnectionManager());
        }
        catch (final IOException e)
        {
            throw new FileSystemException("vfs.provider.webdav/connect.error", hostname, e);
        }

        return client;
    }
View Full Code Here

        {
            name = parseUri(baseFile!=null?baseFile.getName():null, uri);
        }
        catch (FileSystemException exc)
        {
            throw new FileSystemException("vfs.provider/invalid-absolute-uri.error", uri, exc);
        }

        // Locate the file
        return findFile(name, fileSystemOptions);
    }
View Full Code Here

                {
                    resource.setProperties(WebdavResource.DEFAULT, 1);
                }
                catch (IOException e)
                {
                    throw new FileSystemException(e);
                }
            }
            finally
            {
                optionsMethod.releaseConnection();
View Full Code Here

            // after this our resource should be reset
            parent.doListChildrenResolved();
        }
        catch (Exception e)
        {
            throw new FileSystemException(e);
        }
    }
View Full Code Here

            }
        }

        if (children == null)
        {
            throw new FileSystemException("vfs.provider.webdav/list-children.error", resource.getStatusMessage());
        }

        List vfs = new ArrayList(children.length);
        // WebdavFileObject[] vfs = new WebdavFileObject[children.length];
        for (int i = 0; i < children.length; i++)
View Full Code Here

        //// resource.getHttpURL().setEscapedPath(getName().getPath() + '/');
        resource.getHttpURL().setPath(getName().getPathDecoded() + '/');
        final boolean ok = resource.mkcolMethod();
        if (!ok)
        {
            throw new FileSystemException("vfs.provider.webdav/create-collection.error", resource.getStatusMessage());
        }

        // reread allowed methods
        reattach();
    }
View Full Code Here

    {
        final int b1 = is.read();
        final int b2 = is.read();
        if (b1 != 'B' || b2 != 'Z')
        {
            throw new FileSystemException("vfs.provider.compressedFile/not-a-compressedFile-file.error", name);
        }
        return new CBZip2InputStream(is);
    }
View Full Code Here

        resolveRedirection();
        // final boolean ok = resource.deleteMethod(getName().getPathDecoded() /*url.getPath()*/);
        final boolean ok = resource.deleteMethod();
        if (!ok)
        {
            throw new FileSystemException("vfs.provider.webdav/delete-file.error", resource.getStatusMessage());
        }

        // reread allowed methods
        reattach();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.FileSystemException

Copyright © 2018 www.massapicom. 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.