Bitrix API

Disk extends BFile

FinalYes

Table of Contents

Constants

ROOT_DIRECTORY_NAME  = 'body'
STORAGE_CODE  = 'documents'
TEMPLATES_FOLDER_CODE  = 'FOR_DOCUMENTGENERATOR_TEMPLATES'

Methods

delete()  : bool
download()  : bool
getDiskStorage()  : Storage|null
getModificationTime()  : false|int
getSize()  : false|int
getTemplatesFolder()  : Folder|null
read()  : false|array<string|int, mixed>
Try to read content. Returns string on success, false on failure.
upload()  : AddResult
write()  : AddResult
Save $content. Returns true on success, false on failure.

Constants

ROOT_DIRECTORY_NAME

public mixed ROOT_DIRECTORY_NAME = 'body'

STORAGE_CODE

public mixed STORAGE_CODE = 'documents'

TEMPLATES_FOLDER_CODE

public mixed TEMPLATES_FOLDER_CODE = 'FOR_DOCUMENTGENERATOR_TEMPLATES'

Methods

delete()

public delete(mixed $fileId) : bool
Parameters
$fileId : mixed
Return values
bool

download()

public download(int $fileId[, string $fileName = '' ]) : bool
Parameters
$fileId : int
$fileName : string = ''
Tags
throws
LoaderException
throws
NotImplementedException
Return values
bool

getDiskStorage()

public static getDiskStorage() : Storage|null
Tags
throws
ArgumentException
Return values
Storage|null

getModificationTime()

public getModificationTime(int $fileId) : false|int
Parameters
$fileId : int
Tags
throws
LoaderException
throws
NotImplementedException
Return values
false|int

getSize()

public getSize(mixed $fileId) : false|int
Parameters
$fileId : mixed
Tags
throws
LoaderException
throws
NotImplementedException
Return values
false|int

getTemplatesFolder()

public static getTemplatesFolder() : Folder|null
Tags
throws
ArgumentException
Return values
Folder|null

read()

Try to read content. Returns string on success, false on failure.

public read(mixed $fileId) : false|array<string|int, mixed>
Parameters
$fileId : mixed
Return values
false|array<string|int, mixed>

upload()

public upload(array<string|int, mixed> $file) : AddResult
Parameters
$file : array<string|int, mixed>
Return values
AddResult

write()

Save $content. Returns true on success, false on failure.

public write(string $content[, array<string|int, mixed> $options = [] ]) : AddResult
Parameters
$content : string
$options : array<string|int, mixed> = []
Return values
AddResult

        
On this page

Search results