1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CZip
Граф наследования:CZip:
IBXArchive

Открытые члены

 __construct ($pzipname)
 Pack ($arFileList, $startFile="")
 GetStartFile ()
 Unpack ($strPath)
 SetOptions ($arOptions)
 GetOptions ()
 GetErrors ()
 Create ($arFileList, $arParams=0)
 Add ($arFileList, $arParams=0)
 GetContent ()
 Extract ($arParams=0)
 Delete ($arParams)
 GetProperties ()

Поля данных

const ReadBlockSize = 2048
 $zipname = ''
 $zipfile = 0
Поля данных унаследованные от IBXArchive
const StatusError = 0
const StatusSuccess = 1
const StatusContinue = 2

Подробное описание

См. определение в файле zip.php строка 11

Конструктор(ы)

◆ __construct()

__construct ( $pzipname)

См. определение в файле zip.php строка 34

Методы

◆ Add()

Add ( $arFileList,
$arParams = 0 )

Archives files and folders

Аргументы
array$arFileListcontaining files and folders to be packed into archive
array | int$arParams- if specified contains options to use for archivation
Возвращает
array|int 0 or false if error, array with the list of packed files and folders if success. Errors can be seen using GetErrors() method

См. определение в файле zip.php строка 574

◆ Create()

Create ( $arFileList,
$arParams = 0 )

Creates an archive

Аргументы
array$arFileListcontaining files and folders to be added to the archive
array | int$arParamsan array of parameters
Возвращает
array|int 0 if error, array $arResultList with packed files if success

См. определение в файле zip.php строка 523

◆ Delete()

Delete ( $arParams)

Deletes a file from the archive

Аргументы
array$arParamsrules defining which files should be deleted
Возвращает
array|int 0 if error, array $arResultList with deleted files if success

См. определение в файле zip.php строка 693

◆ Extract()

Extract ( $arParams = 0)

Extracts archive content

Аргументы
array | int$arParamsan array of parameters
Возвращает
array|int 0 or false if error, array of extracted files and folders if success. Errors can be seen using GetErrors() method

См. определение в файле zip.php строка 649

◆ GetContent()

GetContent ( )

Returns the list of files and folders in the archive

Возвращает
array|int 0 if error, array of results if success

См. определение в файле zip.php строка 625

◆ GetErrors()

GetErrors ( )

Returns an array containing error codes and messages. Call this method after Pack or Unpack

Возвращает
array

Замещает IBXArchive.

См. определение в файле zip.php строка 512

◆ GetOptions()

GetOptions ( )

Returns an array of packing/unpacking options and their current values

Возвращает
array

Замещает IBXArchive.

См. определение в файле zip.php строка 493

◆ GetProperties()

GetProperties ( )

Returns archive properties

Возвращает
array|int 0 if error, array $arProperties if success

См. определение в файле zip.php строка 728

◆ GetStartFile()

GetStartFile ( )

Called from the archive object it returns the name of the file for the next step during multistep archivation. Call if Pack method returned 2

Возвращает
string path to file

Замещает IBXArchive.

См. определение в файле zip.php строка 396

◆ Pack()

Pack ( $arFileList,
$startFile = "" )

Packs files and folders into archive

Аргументы
array$arFileListcontaining files and folders to be packed into archive
string$startFile- if specified then all files before it won't be packed during the traversing of $arFileList. Can be used for multistep archivation
Возвращает
mixed 0 or false if error, 1 if success, 2 if the next step should be performed. Errors can be seen using GetErrors() method

Замещает IBXArchive.

См. определение в файле zip.php строка 48

◆ SetOptions()

SetOptions ( $arOptions)

Lets the user define packing/unpacking options

Аргументы
array$arOptionsan array with the options' names and their values
Возвращает
void

Замещает IBXArchive.

См. определение в файле zip.php строка 451

◆ Unpack()

Unpack ( $strPath)

Unpacks archive into specified folder

Аргументы
string$strPath- path to the directory to unpack archive to
Возвращает
mixed 0 or false if error, 1 if success. Errors can be seen using GetErrors() method

Замещает IBXArchive.

См. определение в файле zip.php строка 406

Поля

◆ $zipfile

$zipfile = 0

См. определение в файле zip.php строка 16

◆ $zipname

$zipname = ''

См. определение в файле zip.php строка 15

◆ ReadBlockSize

const ReadBlockSize = 2048

См. определение в файле zip.php строка 13


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/main/classes/general/zip.php