Package com.cloudloop.storage

Examples of com.cloudloop.storage.CloudStoreDirectory


        if ( path.getPath(  ).endsWith( "/" ) || path.getPath(  ).endsWith( "\\" ) )
        {
            return CloudStoreObjectType.DIRECTORY;
        }

        CloudStoreDirectory dir = ( ( CloudStore ) path.getCloudProvider(  ) ).getDirectory( path.getPath(  ) );

        if ( dir.existsInStore(  ) )
        {
            return CloudStoreObjectType.DIRECTORY;
        }

        CloudStoreFile file = ( ( CloudStore ) path.getCloudProvider(  ) ).getFile( path.getPath(  ) );
View Full Code Here


            .getCloudloop( ) );
        pathInitialized = true;
    }

    CloudStore cloudStore = (CloudStore) path.getCloudProvider( );
    CloudStoreDirectory cloudStoreDirectory = cloudStore.getDirectory( path
        .getPath( ) );
    CloudStoreObject[] cloudStoreObjects = cloudStoreDirectory
        .listContents( recursive );

    for (CloudStoreObject cloudStoreObject : cloudStoreObjects)
    {
      // By default, set the last modified date to garbage so
View Full Code Here

    @Test
    public void testSendContainsRequest( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  store.createDirectory( store.getDirectory( "foo/bar/../" ) );
  CloudStoreDirectory dir = store.getDirectory( "foo/bar/../" );
  assertTrue( store.contains( dir ) );
    }
View Full Code Here

   
    @Test
    public void testSendContainsRequest_Directory_DoesNotExist( )
    {
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( "/foo/bar/../" );
  assertFalse( store.contains( dir ) );
    }
View Full Code Here

  store.createDirectory( store.getDirectory( baseDir ) );
 
  for ( int i = 0; i < numSubDirs; i++ )
  {
      String dirPath = baseDir + "dir_" + i + "/";
      CloudStoreDirectory dir = store.getDirectory( dirPath );
      store.createDirectory( dir );
     
      // create files and directories under each subdir
      // in order to test recursive functionality
      for ( int j = 0; j < numSubSubObjects; j++ )
      {
    CloudStoreDirectory subDir = store.getDirectory( dirPath
      + "sub_dir_" + j + "/" );
    store.createDirectory( subDir );
   
    CloudStoreFile subFile = store.getFile( dirPath + "sub_file_"
      + j );
View Full Code Here

 
  setupDirectoryForListTest( numSubDirs, numFiles, numSubSubObjects,
           baseDir );
 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  CloudStoreObject[ ] objs = store
    .listDirectoryContents( dir,
          CloudStoreObjectType.OBJECT, false );
  CloudStoreObject[ ] files = store
View Full Code Here

 
  setupDirectoryForListTest( numSubDirs, numFiles, numSubSubObjects,
           baseDir );
 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  CloudStoreObject[ ] objs = store
    .listDirectoryContents( dir,
          CloudStoreObjectType.OBJECT, true );
  CloudStoreObject[ ] files = store
View Full Code Here

 
  setupDirectoryForListTest( numSubDirs, numFiles, numSubSubObjects,
           baseDir );
 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  CloudStoreObject[ ] objs = store
    .listDirectoryContents( dir,
          CloudStoreObjectType.OBJECT, false );
  CloudStoreObject[ ] files = store
View Full Code Here

 
  setupDirectoryForListTest( numSubDirs, numFiles, numSubSubObjects,
           baseDir );
 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  dir.remove( false );
  assertFalse( dir.existsInStore( ) );
    }
View Full Code Here

 
  setupDirectoryForListTest( numSubDirs, numFiles, numSubSubObjects,
           baseDir );
 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  boolean exThrown = false;
  try
  {
      dir.remove( false );
  }
  catch ( DirectoryIsNotEmptyException ex )
  {
      exThrown = true;
  }
View Full Code Here

TOP

Related Classes of com.cloudloop.storage.CloudStoreDirectory

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.