C# Class azurecopy.DropboxHandler

Inheritance: IBlobHandler
Exibir arquivo Open project: kpfaulkner/azurecopy Class Usage Examples

Private Properties

Property Type Description
GenerateDir string
GenerateFileName string
GenerateFullPath string
GetBlobPrefixFromUrl string
MakeDirectories void

Public Methods

Method Description
DropboxHandler ( string url ) : System
GetBaseUrl ( ) : string
GetBlobNameFromUrl ( string url ) : string

Gets blob name from the full url. This is cloud specific.

GetContainerNameFromUrl ( string url ) : string

Gets container name from the full url. This is cloud specific.

ListBlobsInContainer ( string containerName = null, string blobPrefix = null, bool debug = false ) : IEnumerable

Lists all blobs in a container. Recurse directories to get all contents. Either do it here, or when reading blob (and it turns out to be a directory). Always recursing might not always be wanted, but think its a good default (for now).

ListContainers ( string root ) : List

List containers/directories off the root. For storage schemes that allow real directories maybe the root will be

MakeContainer ( string containerName ) : void

Make container/directory (depending on platform).

MoveBlob ( string originContainer, string destinationContainer, string startBlobname ) : void

Move blob

OverrideConfiguration ( string>.Dictionary configuration ) : void
ReadBlob ( string containerName, string blobName, string cacheFilePath = "" ) : Blob

Read blob.

WriteBlob ( string containerName, string blobName, Blob blob, int parallelUploadFactor = 1, int chunkSizeInMB = 4 ) : void

Write blob

Private Methods

Method Description
GenerateDir ( string fullPath ) : string
GenerateFileName ( string fullPath ) : string
GenerateFullPath ( string containerName, string blobName ) : string
GetBlobPrefixFromUrl ( string url ) : string
MakeDirectories ( string dir ) : void

make directories in dropbox. Needs to create parent then children.

Method Details

DropboxHandler() public method

public DropboxHandler ( string url ) : System
url string
return System

GetBaseUrl() public method

public GetBaseUrl ( ) : string
return string

GetBlobNameFromUrl() public method

Gets blob name from the full url. This is cloud specific.
public GetBlobNameFromUrl ( string url ) : string
url string
return string

GetContainerNameFromUrl() public method

Gets container name from the full url. This is cloud specific.
public GetContainerNameFromUrl ( string url ) : string
url string
return string

ListBlobsInContainer() public method

Lists all blobs in a container. Recurse directories to get all contents. Either do it here, or when reading blob (and it turns out to be a directory). Always recursing might not always be wanted, but think its a good default (for now).
public ListBlobsInContainer ( string containerName = null, string blobPrefix = null, bool debug = false ) : IEnumerable
containerName string
blobPrefix string
debug bool
return IEnumerable

ListContainers() public method

List containers/directories off the root. For storage schemes that allow real directories maybe the root will be
public ListContainers ( string root ) : List
root string
return List

MakeContainer() public method

Make container/directory (depending on platform).
public MakeContainer ( string containerName ) : void
containerName string
return void

MoveBlob() public method

Move blob
public MoveBlob ( string originContainer, string destinationContainer, string startBlobname ) : void
originContainer string
destinationContainer string
startBlobname string
return void

OverrideConfiguration() public method

public OverrideConfiguration ( string>.Dictionary configuration ) : void
configuration string>.Dictionary
return void

ReadBlob() public method

Read blob.
public ReadBlob ( string containerName, string blobName, string cacheFilePath = "" ) : Blob
containerName string
blobName string
cacheFilePath string
return Blob

WriteBlob() public method

Write blob
public WriteBlob ( string containerName, string blobName, Blob blob, int parallelUploadFactor = 1, int chunkSizeInMB = 4 ) : void
containerName string
blobName string
blob Blob
parallelUploadFactor int
chunkSizeInMB int
return void