MBrace.Core


CloudFile

Namespace: MBrace.Core

Contains static methods used for performing file operations in the cloud store.

Static members

Static memberDescription
BeginRead(path)
Signature: path:string -> LocalCloud<Stream>
Type parameters: 'T

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

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

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

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

Deletes file in given path.

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

Asynchronously downloads a collection of cloud files to local disk.

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

Downloads a file from store to local disk.

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

Write the contents of a CloudFile directly to a Stream.

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

Gets all files that exist in given container.

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

Checks if file exists in store.

GetInfo(path, verify)
Signature: (path:string * verify:bool option) -> LocalCloud<CloudFileInfo>

Creates a CloudFileInfo instance using given path.

GetLastModifiedTime(path)
Signature: path:string -> LocalCloud<DateTimeOffset>

Gets the last modification time for given file.

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

Gets the size of provided file, in bytes.

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

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

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

Reads a file as an array of lines.

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

Dump all file contents to a single string.

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

Reads a file as a sequence of lines.

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

Uploads a collection local files to store.

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

Uploads a file from local disk to store.

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

Write the contents of a stream directly to a CloudFile.

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

Write buffer contents to CloudFile.

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

Writes a sequence of lines to a given CloudFile path.

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

Writes string contents to given CloudFile.

Fork me on GitHub