Click or drag to resize

BlobFactoryCreate Method (String, Uri)

Creates an IBlob given a type and a URL to a file

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0033
Syntax
C#
public static IBlob Create(
	string contentType,
	Uri fileUrl
)

Parameters

contentType
Type: SystemString
The binary type of the blob
fileUrl
Type: SystemUri
The url to the file to read

Return Value

Type: IBlob
An instantiated IBlob object
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if fileUrl is null
ArgumentExceptionThrown if fileUrl is not a file based URL
DirectoryNotFoundExceptionThe specified fileUrl is invalid, (for example, it is on an unmapped drive).
UnauthorizedAccessExceptionfileUrl specified a directory -or- The caller does not have the required permission.
FileNotFoundExceptionThe file specified in fileUrl was not found.
IOExceptionAn I/O error occurred while opening the file.
See Also