Click or drag to resize

IFolderCreateFileAsync Method

IT Hit User File System
Creates a new file in this folder in the remote storage.

Namespace:  ITHit.FileSystem
Assembly:  ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 3.2.8936.0
Syntax
Task<byte[]> CreateFileAsync(
	IFileMetadata fileMetadata,
	Stream content = null
)

Parameters

fileMetadata
Type: ITHit.FileSystemIFileMetadata
Information about the new file.
content (Optional)
Type: System.IOStream
New file content or null if the file content can not be obtained, for example if the file is blocked.

Return Value

Type: TaskByte
Item ID of a newly created file or null if the remote storage does not provide item ID. See ItemId description for more details about item ID.
Remarks
On Windows, if this method competes without exceptions the item is converted to a placeholder. Otherwise if is left in the file system as a regular file and must be sent to a remote storage and converted to a placeholder at a later time by a synchronization service by calling the [!:EngineWindows.ClientNotifications().CreateAsync()]. On Windows, if the content parameter is not null, and the method completes without exceptions, the item is marked as In-sync. Otherwise the item is left in the not In-sync state and must be sent to a remote storage by calling the [!:EngineWindows.ClientNotifications().UpdateAsync()].
See Also