Package org.apache.commons.vfs2.util

Examples of org.apache.commons.vfs2.util.PosixPermissions


    {
        if (!inited)
        {
            // Import the test tree
            FileObject fo = manager.resolveFile("ram:/");
            RamFileSystem fs = (RamFileSystem) fo.getFileSystem();
            fs.importTree(new File(AbstractVfsTestCase.getTestDirectory()));
            fo.close();

            inited=true;
        }
View Full Code Here


    extends AbstractProviderTestConfig
    implements ProviderTestConfig
{
    public static Test suite() throws Exception
    {
        CacheTestSuite suite = new CacheTestSuite(new org.apache.commons.vfs2.cache.NullFilesCacheTestCase());
        suite.addTests(NullFilesCacheTests.class);
        return suite;
    }
View Full Code Here

    extends AbstractProviderTestConfig
    implements ProviderTestConfig
{
    public static Test suite() throws Exception
    {
        CacheTestSuite suite = new CacheTestSuite(new LRUFilesCacheTestCase());
        suite.addTests(LRUFilesCacheTests.class);
        return suite;
    }
View Full Code Here

    /**
     * Creates the test suite for the ram file system.
     */
    public static Test suite() throws Exception
    {
        return new ProviderTestSuite(new RamProviderTestCase());
    }
View Full Code Here

    private static final String TEST_URI = "test.http.uri";
    public static Test suite() throws Exception
    {
        if (System.getProperty(TEST_URI) != null)
        {
            return new ProviderTestSuite(new HttpProviderTestCase());
        }
        else
        {
            return notConfigured(HttpProviderTestCase.class);
        }
View Full Code Here

    /**
     * Creates the test suite for the jar file system.
     */
    public static Test suite() throws Exception
    {
        return new ProviderTestSuite(new JarProviderTestCase(), true);
    }
View Full Code Here

                    break;
                }
            }
        }
        final boolean isOwner = checkIds ?  attrs.getUId() == getAbstractFileSystem().getUId() : false;
        final PosixPermissions permissions = new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup);

        return permissions;
    }
View Full Code Here

    }

    @Override
    protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception
    {
        final PosixPermissions permissions = getPermissions(false);
        final int newPermissions = permissions.makeReadable(readable, ownerOnly);
        if (newPermissions == permissions.getPermissions())
        {
            return true;
        }

        attrs.setPERMISSIONS(newPermissions);
View Full Code Here

    }

    @Override
    protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception
    {
        final PosixPermissions permissions = getPermissions(false);
        final int newPermissions = permissions.makeWritable(writable, ownerOnly);
        if (newPermissions == permissions.getPermissions())
        {
            return true;
        }

        attrs.setPERMISSIONS(newPermissions);
View Full Code Here


    @Override
    protected boolean doSetExecutable(final boolean executable, final boolean ownerOnly) throws Exception
    {
        final PosixPermissions permissions = getPermissions(false);
        final int newPermissions = permissions.makeExecutable(executable, ownerOnly);
        if (newPermissions == permissions.getPermissions())
        {
            return true;
        }

        attrs.setPERMISSIONS(newPermissions);
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs2.util.PosixPermissions

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.