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

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

 __construct ($strArchiveName, $bCompress=false, $start_time=-1, $max_exec_time=-1, $pos=0, $stepped=false)
 Pack ($arFileList, $startFile="")
 Unpack ($strPath)
 GetStartFile ()
 SetOptions ($arOptions)
 GetOptions ()
 Add ($vFileList, $strAddPath=false, $strRemovePath=false)
 addFile ($strFilename, $strAddPath, $strRemovePath)
 addString ($strFilename, $strFileContent)
 extractFiles ($strPath, $vFileList=false)
 extractContent ()
 GetErrors ()
 getFilePos ()

Поля данных

 $_strArchiveName = ""
 $_bCompress = false
 $_strSeparator = " "
 $_dFile = 0
 $_arErrors = []
 $start_time = 0
 $max_exec_time = 0
 $file_pos = 0
 $stepped = false
Поля данных унаследованные от IBXArchive
const StatusError = 0
const StatusSuccess = 1
const StatusContinue = 2

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

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

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

◆ __construct()

__construct ( $strArchiveName,
$bCompress = false,
$start_time = -1,
$max_exec_time = -1,
$pos = 0,
$stepped = false )

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

Методы

◆ Add()

Add ( $vFileList,
$strAddPath = false,
$strRemovePath = false )

Archives files and folders

Аргументы
array$vFileListcontaining files and folders to be packed into archive
string | bool$strAddPath- if specified contains path to add to each packed file/folder
string | bool$strRemovePath- if specified contains path to remove from each packed file/folder
Возвращает
mixed 0 or false if error, array with the list of packed files and folders if success. Errors can be seen using GetErrors() method

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

◆ addFile()

addFile ( $strFilename,
$strAddPath,
$strRemovePath )

Adds file into archive

Аргументы
string$strFilenamefull path to file
string$strAddPath- if specified contains path to add to each packed file/folder
string$strRemovePath- if specified contains path to remove from each packed file/folder
Возвращает
bool false if error, true if success. Errors can be seen using GetErrors() method

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

◆ addString()

addString ( $strFilename,
$strFileContent )

Adds string as a file into archive

Аргументы
string$strFilenamefull path to file
string$strFileContent- file content
Возвращает
bool false if error, true if success. Errors can be seen using GetErrors() method

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

◆ extractContent()

extractContent ( )

Extract content of the archive

Возвращает
array|false false if error, array with the list of unpacked files and folders if success. Errors can be seen using GetErrors() method

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

◆ extractFiles()

extractFiles ( $strPath,
$vFileList = false )

Extract files from the archive

Аргументы
string$strPathpath where to extract
array | bool$vFileListif specified - array of files to be extracted, else - all files will be extracted
Возвращает
bool false if error, true if success. Errors can be seen using GetErrors() method

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

◆ GetErrors()

GetErrors ( )

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

Возвращает
array

Замещает IBXArchive.

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

◆ getFilePos()

getFilePos ( )

Returns the position of the file for the next step

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

◆ GetOptions()

GetOptions ( )

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

Возвращает
array

Замещает IBXArchive.

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

◆ 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.

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

◆ 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 false or 0 if error, 1 if success, 2 if the next step should be performed. Errors can be seen using GetErrors() method

Замещает IBXArchive.

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

◆ SetOptions()

SetOptions ( $arOptions)

Lets the user define packing/unpacking options

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

Замещает IBXArchive.

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

◆ Unpack()

Unpack ( $strPath)

Unpacks archive into specified folder

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

Замещает IBXArchive.

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

Поля

◆ $_arErrors

$_arErrors = []

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

◆ $_bCompress

$_bCompress = false

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

◆ $_dFile

$_dFile = 0

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

◆ $_strArchiveName

$_strArchiveName = ""

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

◆ $_strSeparator

$_strSeparator = " "

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

◆ $file_pos

$file_pos = 0

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

◆ $max_exec_time

$max_exec_time = 0

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

◆ $start_time

$start_time = 0

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

◆ $stepped

$stepped = false

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


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