Examples of existsInStore()


Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

            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

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  dir.remove( false );
  assertFalse( dir.existsInStore( ) );
    }
   
    public void testSendRemoveDirectoryRequest_NotEmpty( )
    {
  int numSubDirs = 2;
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

 
  CloudStoreAdapterBase store = getCloudStoreAdapter( );
  CloudStoreDirectory dir = store.getDirectory( baseDir );
 
  dir.remove( true );
  assertFalse( dir.existsInStore( ) );
    }
   
    // /////////////////////////
   
    @Test
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

  CloudStorePath newDirPath = toDirectory.getPath( )
    .combine(
        PathUtil.popLeaf( fromDirectory.getPath( ) ) );
  CloudStoreDirectory newDirectory = getDirectory( newDirPath
    .getAbsolutePath( ) );
  if ( !newDirectory.existsInStore( ) )
  {
      sendCreateDirectoryRequest( newDirectory );
  }
 
  for ( CloudStoreObject child : children )
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

  assertFalse( file.existsInStore( ) );
  file.setStreamToStore( new MockFileStream( 50 ) );
  file.write( null );
  assertTrue( file.existsInStore( ) );
  CloudStoreDirectory dir = _cloudStore.getDirectory( randomDirName );
  assertFalse( dir.existsInStore( ) );
  _cloudStore.createDirectory( _cloudStore.getDirectory( dir.getPath( )
    .getAbsolutePath( ) ) );
  CloudStoreFile newFile =
    _cloudStore.getFile( dir.getPath( )
    .combine( PathUtil.popLeaf( file.getPath( ) ) )
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

    public void testMoveTopLevelDirToLowerLevel( )
    {
  String randomDirName = "238787878ewafhjsdhagq7yuhasdo909";
  String newPath = "/67ryfhgft67ityuggjhjjkht677rtf/i8uyuyfdrsesdxcxcx9/";
  CloudStoreDirectory dir = _cloudStore.getDirectory( randomDirName );
  assertFalse( dir.existsInStore( ) );
  _cloudStore.createDirectory( dir );
  CloudStoreDirectory newDir = _cloudStore.getDirectory( newPath );
  _cloudStore.moveDirectory( dir, newDir );
 
  assertFalse( dir.existsInStore( ) );
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

  _cloudStore.createDirectory( dir );
  CloudStoreDirectory newDir = _cloudStore.getDirectory( newPath );
  _cloudStore.moveDirectory( dir, newDir );
 
  assertFalse( dir.existsInStore( ) );
  assertTrue( newDir.existsInStore( ) );
    }
   
    @Test
    public void testCopyLocalObjectsIntoStore( )
    {
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

 
  // TODO: This check could be slow. Are there some optimizations we could
  // make?
  CloudStoreDirectory parentDir = directory.getParentDirectory( );
  if ( !parentDir.getPath( ).equals( PathUtil.ROOT_DIRECTORY )
    && !parentDir.existsInStore( ) )
  {
      createDirectory( parentDir );
  }
 
  return sendCreateDirectoryRequest( directory );
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

          + " and retry your request." );
  }
 
  CloudStoreDirectory dir = getDirectory( file.getPath( )
    .getAbsolutePath( ) );
  if ( dir.existsInStore( ) )
  {
      throw new DirectoryAlreadyExistsException(
        "Cannot upload file to '"
          + file.getPath( ).getAbsolutePath( )
          + "' because a directory already exists there (you cannot have a directory and file with the same name." );
View Full Code Here

Examples of com.cloudloop.storage.CloudStoreDirectory.existsInStore()

  CloudStoreDirectory newDir = getDirectory( directory
    .getParentDirectory( ).getPath( )
    .combine(
        new CloudStorePath( newName, true,
    PathUtil.ROOT_DIRECTORY ) ).getAbsolutePath( ) );
  if ( newDir.existsInStore( ) )
  {
      throw new DirectoryAlreadyExistsException( "Directory '"
        + directory.getPath( ).getAbsolutePath( )
        + "' already exists in the store." );
  }
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.