Each file archive type must extend this class.  
 More...
|  | 
| const | CREATE = 2 | 
|  | Open archive if exists, create if does not. 
 | 
|  | 
| const | OPEN = 1 | 
|  | Open archive if exists, fail if does not exist. 
 | 
|  | 
| const | OVERWRITE = 4 | 
|  | Always create new archive. 
 | 
|  | 
|  | 
|  | mangle_pathname ($localname) | 
|  | Tries to convert $localname into another encoding, please note that it may fail really badly. 
 | 
|  | 
|  | unmangle_pathname ($localname) | 
|  | Tries to convert $localname into utf-8 please note that it may fail really badly. 
 | 
|  | 
|  | 
| string | $encoding = 'utf-8' | 
|  | Encoding of file names - windows usually expects DOS single-byte charset. 
 | 
|  | 
Each file archive type must extend this class. 
- Copyright
- 2008 Petr Skoda (http://skodak.org) 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ add_directory()
  
  | 
        
          | file_archive::add_directory | ( |  | $localname | ) |  |  | abstract | 
 
Add empty directory into archive. 
- Parameters
- 
  
    | string | $localname | name of file in archive |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ add_file_from_pathname()
  
  | 
        
          | file_archive::add_file_from_pathname | ( |  | $localname, |  
          |  |  |  | $pathname ) |  | abstract | 
 
Add file into archive. 
- Parameters
- 
  
    | string | $localname | name of file in archive |  | string | $pathname | location of file |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ add_file_from_string()
  
  | 
        
          | file_archive::add_file_from_string | ( |  | $localname, |  
          |  |  |  | $contents ) |  | abstract | 
 
Add content of string into archive. 
- Parameters
- 
  
    | string | $localname | name of file in archive |  | string | $contents | contents |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ close()
Close archive. 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ count()
Returns number of files in archive. 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ get_info()
  
  | 
        
          | file_archive::get_info | ( |  | $index | ) |  |  | abstract | 
 
Returns file information. 
- Parameters
- 
  
  
- Return values
- 
  
    | stdClass|bool | object or false if error |  
 
Reimplemented in zip_archive.
 
 
◆ get_stream()
  
  | 
        
          | file_archive::get_stream | ( |  | $index | ) |  |  | abstract | 
 
Returns file stream for reading of content. 
- Parameters
- 
  
  
- Return values
- 
  
    | stream|bool | stream or false if error |  
 
Reimplemented in zip_archive.
 
 
◆ list_files()
  
  | 
        
          | file_archive::list_files | ( |  | ) |  |  | abstract | 
 
Returns array of info about all files in archive. 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ mangle_pathname()
  
  | 
        
          | file_archive::mangle_pathname | ( |  | $localname | ) |  |  | protected | 
 
Tries to convert $localname into another encoding, please note that it may fail really badly. 
- Parameters
- 
  
    | string | $localname | name of file in utf-8 encoding |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ open()
Open or create archive (depending on $mode). 
- Parameters
- 
  
    | string | $archivepathname | archive path name |  | int | $mode | OPEN, CREATE or OVERWRITE constant |  | string | $encoding | archive local paths encoding |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
◆ unmangle_pathname()
  
  | 
        
          | file_archive::unmangle_pathname | ( |  | $localname | ) |  |  | protected | 
 
Tries to convert $localname into utf-8 please note that it may fail really badly. 
The resulting file name is cleaned.
- Parameters
- 
  
    | string | $localname | name of file in $this->encoding |  
 
- Return values
- 
  
  
Reimplemented in zip_archive.
 
 
The documentation for this class was generated from the following file: