Open Journal Systems  3.3.0
FileArchive Class Reference

Public Member Functions

 __construct ()
 
 create ($files, $filesDir)
 

Static Public Member Functions

static isFunctional ()
 
static tarFunctional ()
 
static zipFunctional ()
 

Detailed Description

Class provides functionality for creating an archive of files.

Definition at line 16 of file FileArchive.inc.php.

Constructor & Destructor Documentation

◆ __construct()

FileArchive::__construct ( )

Definition at line 18 of file FileArchive.inc.php.

Member Function Documentation

◆ create()

FileArchive::create (   $files,
  $filesDir 
)

Assembles an array of filenames into either a tar.gz or a .zip file, based on what is available. Returns a string representing the path to the archive on disk.

Parameters
array$filesthe files to add, in an associative array of the format ('serverPath' => 'clientFilename')
string$filesDira path to the files on disk.
Returns
string the path to the archive.

Definition at line 30 of file FileArchive.inc.php.

References Config\getVar().

◆ isFunctional()

static FileArchive::isFunctional ( )
static

Definition at line 76 of file FileArchive.inc.php.

References tarFunctional(), and zipFunctional().

Referenced by FilesGridCapabilities\canDownloadAll().

◆ tarFunctional()

static FileArchive::tarFunctional ( )
static

Return true if the tar tools are configured.

Definition at line 71 of file FileArchive.inc.php.

References Config\getVar().

Referenced by isFunctional().

◆ zipFunctional()

static FileArchive::zipFunctional ( )
static

Return true if the zip extension is loaded.

Returns
boolean

Definition at line 64 of file FileArchive.inc.php.

Referenced by isFunctional().


The documentation for this class was generated from the following file: