MBrace.Core


CloudFileClient

Namespace: MBrace.Core.Internals

Collection of file store operations

Instance members

Instance memberDescription
BeginRead(path)
Signature: path:string -> Stream

Returns a reader function for given path in cloud store, if it exists.

BeginReadAsync(path)
Signature: path:string -> Async<Stream>

Asynchronously returns a reader function for given path in cloud store, if it exists.

BeginWrite(path)
Signature: path:string -> Stream

Creates a new file in store and returns a local writer stream.

BeginWriteAsync(path)
Signature: path:string -> Async<Stream>

Asynchronously creates a new file in store and returns a local writer stream.

Delete(path)
Signature: path:string -> unit

Deletes file in given path.

DeleteAsync(path)
Signature: path:string -> Async<unit>

Deletes file in given path.

Download(...)
Signature: (sourcePaths:seq<string> * targetDirectory:string * overwrite:bool option * decompress:bool option) -> string []

Downloads a collection of cloud files to local disk.

Download(...)
Signature: (sourcePath:string * targetPath:string * overwrite:bool option * decompress:bool option) -> unit

Downloads a file from store to local disk.

DownloadAsync(...)
Signature: (sourcePaths:seq<string> * targetDirectory:string * overwrite:bool option * decompress:bool option) -> Async<string []>

Asynchronously downloads a collection of cloud files to local disk.

DownloadAsync(...)
Signature: (sourcePath:string * targetPath:string * overwrite:bool option * decompress:bool option) -> Async<unit>

Asynchronously downloads a file from store to local disk.

DownloadToStream(path, stream)
Signature: (path:string * stream:Stream) -> unit

Asynchronously write the contents of a CloudFile directly to a Stream.

DownloadToStreamAsync(path, stream)
Signature: (path:string * stream:Stream) -> Async<unit>

Asynchronously write the contents of a CloudFile directly to a Stream.

Enumerate(dirPath)
Signature: dirPath:string -> CloudFileInfo []

Gets all files that exist in given container.

EnumerateAsync(dirPath)
Signature: dirPath:string -> Async<CloudFileInfo []>

Gets all files that exist in given container.

Exists(path)
Signature: path:string -> bool

Checks if file exists in store.

ExistsAsync(path)
Signature: path:string -> Async<bool>

Checks if file exists in store.

GetSize(path)
Signature: path:string -> int64

Gets the size of provided file, in bytes.

GetSizeAsync(path)
Signature: path:string -> Async<int64>

Gets the size of provided file, in bytes.

Persist(...)
Signature: (value:'T * path:string option * serializer:ISerializer option * compress:bool option) -> PersistedValue<'T>
Type parameters: 'T

Persists a value to the cloud store.

PersistAsync(...)
Signature: (value:'T * path:string option * serializer:ISerializer option * compress:bool option) -> Async<PersistedValue<'T>>
Type parameters: 'T

Asynchronously persists a value to the cloud store.

PersistSequence(...)
Signature: (values:seq<'T> * path:string option * serializer:ISerializer option * compress:bool option) -> PersistedSequence<'T>
Type parameters: 'T

Creates a new persisted sequence by writing provided sequence to a cloud file in the underlying store.

PersistSequenceAsync(...)
Signature: (values:seq<'T> * path:string option * serializer:ISerializer option * compress:bool option) -> Async<PersistedSequence<'T>>
Type parameters: 'T

Asynchronously creates a new persisted sequence by writing provided sequence to a cloud file in the underlying store.

ReadAllBytes(path)
Signature: path:string -> byte []

Store all contents of given file to a new byte array.

ReadAllBytesAsync(path)
Signature: path:string -> Async<byte []>

Store all contents of given file to a new byte array.

ReadAllLines(path, encoding)
Signature: (path:string * encoding:Encoding option) -> string []

Reads a file as an array of lines.

ReadAllLinesAsync(path, encoding)
Signature: (path:string * encoding:Encoding option) -> Async<string []>

Reads a file as an array of lines.

ReadAllText(path, encoding)
Signature: (path:string * encoding:Encoding option) -> string

Dump all file contents to a single string.

ReadAllTextAsync(path, encoding)
Signature: (path:string * encoding:Encoding option) -> Async<string>

Dump all file contents to a single string.

ReadLines(path, encoding)
Signature: (path:string * encoding:Encoding option) -> seq<string>

Reads a file as a sequence of lines.

ReadLinesAsync(path, encoding)
Signature: (path:string * encoding:Encoding option) -> Async<seq<string>>

Reads a file as a sequence of lines.

Upload(...)
Signature: (sourcePaths:seq<string> * targetDirectory:string * overwrite:bool option * compress:bool option) -> CloudFileInfo []

Uploads a collection local files to store.

Upload(...)
Signature: (sourcePath:string * targetPath:string * overwrite:bool option * compress:bool option) -> CloudFileInfo

Uploads a local file to store.

UploadAsync(...)
Signature: (sourcePaths:seq<string> * targetDirectory:string * overwrite:bool option * compress:bool option) -> Async<CloudFileInfo []>

Uploads a collection local files to store.

UploadAsync(...)
Signature: (sourcePath:string * targetPath:string * overwrite:bool option * compress:bool option) -> Async<CloudFileInfo>

Uploads a local file to store.

UploadFromStream(...)
Signature: (path:string * stream:Stream * overwrite:bool option) -> CloudFileInfo

Write the contents of a stream directly to a CloudFile.

UploadFromStreamAsync(...)
Signature: (path:string * stream:Stream * overwrite:bool option) -> Async<CloudFileInfo>

Asynchronously Write the contents of a stream directly to a CloudFile.

WriteAllBytes(path, buffer)
Signature: (path:string * buffer:byte []) -> CloudFileInfo

Write buffer contents to CloudFile.

WriteAllBytesAsync(path, buffer)
Signature: (path:string * buffer:byte []) -> Async<CloudFileInfo>

Write buffer contents to CloudFile.

WriteAllLines(path, lines, encoding)
Signature: (path:string * lines:seq<string> * encoding:Encoding option) -> CloudFileInfo

Writes a sequence of lines to a given CloudFile path.

WriteAllLinesAsync(...)
Signature: (path:string * lines:seq<string> * encoding:Encoding option) -> Async<CloudFileInfo>

Writes a sequence of lines to a given CloudFile path.

WriteAllText(path, text, encoding)
Signature: (path:string * text:string * encoding:Encoding option) -> CloudFileInfo

Writes string contents to given CloudFile.

WriteAllTextAsync(path, text, encoding)
Signature: (path:string * text:string * encoding:Encoding option) -> Async<CloudFileInfo>

Writes string contents to given CloudFile.

Fork me on GitHub