Package com.cloudloop.storage

Examples of com.cloudloop.storage.CloudStoreDirectory


  else
  {
      // HACK!! THIS COULD BE SLOW!!
      // TODO: Get rid of this when Nirvanix introduces the ability to
      // copy files within the same folder.
      CloudStoreDirectory mutualParent = toFile.getParentDirectory( );
      CloudStoreFile newFile =
        getFile(
        mutualParent.getPath( ).combine(
                 PathUtil.popLeaf( toFile
        .getPath( ) )
        ).getAbsolutePath( )
        );
      newFile.setStreamToStore( fromFile.read( null ) );
View Full Code Here


           FolderSortCode.Name,
           true );
     
      for ( Folder childFolder : folder.getFolders( ) )
      {
    CloudStoreDirectory outputDir =
      getDirectory(
      getPathNormalizer( )
      .normalizeToCloudStorePath( childFolder.getPath( ),
                true ).getAbsolutePath( )
      );
    CloudStoreObjectMetadata metadata = new CloudStoreObjectMetadata( );
    metadata.setLastModifiedDate( childFolder.getCreatedDate( ) );
    outputDir.setMetadata( metadata );
    output.add( outputDir );
    numProcessed++;
      }
      for ( File childFile : folder.getFiles( ) )
      {
View Full Code Here

        + "'." );
  }
 
  // 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

        + cloudPath.getAbsolutePath( )
        + " does not represent a directory location." );
  }
 
  // TODO: fill in directory header info
  return new CloudStoreDirectory( this, cloudPath );
    }
View Full Code Here

          + file.getParentDirectory( ).getPath( )
            .getAbsolutePath( )
          + " 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

 
  if ( toStore.equals( this ) )
  {
      // if the source directory is the same as the target
      // directory, then short circuit
      CloudStoreDirectory targetDir = getDirectory( toDirectory.getPath( )
        .combine( PathUtil.popLeaf( fromDirectory.getPath( ) ) )
        .getAbsolutePath( ) );
      if ( targetDir.equals( fromDirectory ) )
      {
    return;
      }
     
      sendIntraStoreCopyRequest( fromDirectory, toDirectory );
View Full Code Here

  {
      throw new InvalidPathException( "Invalid new directory name, '"
        + newName + "'." );
  }
 
  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

        if ( toObj.getStoreObjectType( ) != CloudStoreObjectType.DIRECTORY )
        {
        err.println( "Cannot copy a directory to a file." );
        return 1;
        }
        CloudStoreDirectory fromDir = (CloudStoreDirectory) fromObj;
        fromDir.copyTo( (CloudStoreDirectory) toObj, progressPrinter );
    }
    else
    {
        if ( toObj.getStoreObjectType( ) == CloudStoreObjectType.DIRECTORY )
        {
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.