Examples of existsInStore()


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

    for (String arg : args.getArguments())
    {
      CloudPath filePath = new CloudPath( arg , currentDir, CliSession.getSession( ).getCloudloop( ) );
      CloudStore store = (CloudStore) filePath.getCloudProvider( );
      CloudStoreFile file = store.getFile( filePath.getPath( ) );
      if (!file.existsInStore( ))
      {
        err.println( "File '" + filePath.getPath( )
            + "' does not exist in store '"
            + store.getCloudloopToken( ) + "'." );
        return 1;
View Full Code Here

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

            return CloudStoreObjectType.DIRECTORY;
        }

        CloudStoreFile file = ( ( CloudStore ) path.getCloudProvider(  ) ).getFile( path.getPath(  ) );

        if ( file.existsInStore(  ) )
        {
            return CloudStoreObjectType.FILE;
        }

        return CloudStoreObjectType.OBJECT;
View Full Code Here

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

    {
  // create a random file directly in root dir
  String randomFileName = "adqsflkj82u88y8y8fjahdsfjheydjskl.foo";
  String randomDirName = "238787878ewafhjsdhagq7yuhasdo909";
  CloudStoreFile file = _cloudStore.getFile( randomFileName );
  assertFalse( file.existsInStore( ) );
  file.setStreamToStore( new MockFileStream( 50 ) );
  file.write( null );
  assertTrue( file.existsInStore( ) );
  CloudStoreDirectory dir = _cloudStore.getDirectory( randomDirName );
  assertFalse( dir.existsInStore( ) );
View Full Code Here

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

  String randomDirName = "238787878ewafhjsdhagq7yuhasdo909";
  CloudStoreFile file = _cloudStore.getFile( randomFileName );
  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 =
View Full Code Here

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

    _cloudStore.getFile( dir.getPath( )
    .combine( PathUtil.popLeaf( file.getPath( ) ) )
    .getAbsolutePath( ) );
  _cloudStore.moveFile( file, newFile );
  assertFalse( file.existsInStore( ) );
  assertTrue( newFile.existsInStore( ) );
    }
   
    @Test
    public void testMoveDirectoryIntoItselfFails( )
    {
View Full Code Here

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

 
  CloudStoreFile newFile = getFile( file.getParentDirectory( ).getPath( )
    .combine(
        new CloudStorePath( newName, false,
    PathUtil.ROOT_DIRECTORY ) ).getAbsolutePath( ) );
  if ( newFile.existsInStore( ) )
  {
      throw new FileAlreadyExistsException( "File '"
        + newFile.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.