Function: file.WriteFile
Writes data to a file. If the file already exists, any previous data is cleared.
Syntax
{
"method": "file.WriteFile",
"params": {
"parentId": "...",
"segmentId": "...",
"name": "...",
"file": "...",
"desc": "...",
"data": "...",
},
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}AdvFuture<FileInfo> WriteFile( std::vector<uint8_t> data
std::optional<AdvGuid> parentId = std::nullopt,
std::optional<AdvGuid> segmentId = std::nullopt,
std::optional<AdvString> name = std::nullopt,
std::optional<AdvString> file = std::nullopt,
std::optional<AdvString> desc = std::nullopt );public Task<FileInfo> WriteFileAsync(byte[] data,
Guid? parentId = null,
Guid? segmentId = null,
string? name = null,
string? file = null,
string? desc = null,
CancellationToken ct = default);writeFile(data: string, parentId?: string | undefined, segmentId?: string | undefined, name?: string | undefined, file?: string | undefined, desc?: string | undefined): Promise<FileInfo>;Parameters
parentId : guid optional
Either parent id and name or path must be provided.
segmentId : guid optional
name : string optional
file : string optional
Path of new or existing file or id of existing file.
desc : string optional
data : data
Result : FileInfo
True if successful.
Remarks
This method requires API write access.