This function uploads the given file to the vc. The data will be read from the local file starting
at offset and the number of bytes appended will be equal to length. The destination stream will be
created during this operation and cannot exist prior to upload.
Namespace: Microsoft.Cosmos.ManagementAssembly: VcClient (in VcClient.dll) Version: 1.0.0.0 (1.8.400.4142)
Syntax
C# |
---|
public void Upload(
string sourceFile,
CosmosUri destinationStream,
long offset,
long length,
bool compression,
TimeSpan expirationTime,
bool lineBoundary
) |
Visual Basic |
---|
Public Sub Upload ( _
sourceFile As String, _
destinationStream As CosmosUri, _
offset As Long, _
length As Long, _
compression As Boolean, _
expirationTime As TimeSpan, _
lineBoundary As Boolean _
) |
Visual C++ |
---|
public:
void Upload(
String^ sourceFile,
CosmosUri^ destinationStream,
long long offset,
long long length,
bool compression,
TimeSpan expirationTime,
bool lineBoundary
) |
Parameters
- sourceFile
- Type: String
The name of the file from which the data needs to be uploaded.
- destinationStream
- Type: CosmosUri
The name of the stream that needs to be created for the upload (i.e) the stream
to which the data needs to be uploaded
- offset
- Type: Int64
The position in the stream from which the stream should be copied.
- length
- Type: Int64
The number of bytes to be copied.
- compression
- Type: Boolean
Whether compression should be used while transferring data to the VC.
- expirationTime
- Type: TimeSpan
Time at which the stream should expire. If you would not like to
use expirationTime, just pass null or new TimeSpan(0)
- lineBoundary
- Type: Boolean
Passing true preserves the line boundary.
See Also