void addDir(
mixed
$name, [mixed
$timestamp = 0]
)
|
|
Don't really know what it does. to the archive, LINUX zip (Zip 2. is not able to extract the archive. of completness but it's not invoked anymore (and this works great!).
Don't really know what it does. If method is invoked to add a directory to the archive, LINUX zip (Zip 2.3 (November 29th 1999), by Info-ZIP) is not able to extract the archive. I leave it for the reason of completness but it's not invoked anymore (and this works great!). Note: The following description is wrong!
Adds the given directory path into archive. Do this before putting any files in directory! E.g. add "path/" before adding file "path/file.txt".
API Tags:
Information Tags:
void addFile(
mixed
$data, mixed
$name, [mixed
$timestamp = 0]
)
|
|
Adds "file" to archive
Adds "file" to archive
API Tags:
Information Tags:
string encodeUnixTimestamp(
int
$timestamp
)
|
|
Returns timestamp in format needed by zip archive.
Returns timestamp in format needed by zip archive.
Parameters:
int |
$timestamp: |
UNIX timestamp. |
API Tags:
Return: | Timestamp encoded to ZIP format. |
Information Tags:
Returns the archive file content.
Returns the archive file content.
API Tags:
Return: | content of ZIP file. |
Access: | private |
Information Tags:
void store(
string
$path
)
|
|
Writes the archive to the given path.
Writes the archive to the given path.
Parameters:
string |
$path: |
Path for the ZIP-File (e.g. /mydir/myfile.zip). |
API Tags:
Information Tags:
integer unix2DosTime(
[mixed
$unixtime = 0]
)
|
|
Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).
Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).
API Tags:
Return: | the current date in a four byte DOS format |
Access: | private |
Information Tags:
boolean zip(
string
$path, [boolean
$recursive = true]
)
|
|
Adds the given file or directory tree to the archive.
Adds the given file or directory tree to the archive.
Parameters:
string |
$path: |
File or directory to zip. If a directory is given, the content (all the files and subdirectories) will be added to the archive. |
boolean |
$recursive: |
If set to TRUE, content of the given directory and all its sub directories will be added to the archive. Otherwise only the content of directory is added. Has no effect $path is a file. |
API Tags:
Return: | TRUE if zipping was successful. |
Access: | public |
Information Tags:
boolean zipReplacePath(
string
$path, string
$search_pattern, string
$replace_pattern, [boolean
$recursive = true]
)
|
|
Adds the given file or directory tree to the archive.
Adds the given file or directory tree to the archive.
Parameters:
string |
$path: |
File or directory to zip. If a directory is given, the content (all the files and subdirectories) will be added to the archive. |
string |
$search_pattern: |
If it is not NULL, it defines the part of $path which will be replaced by $replace_pattern. |
string |
$replace_pattern: |
Text which is substituted for $search_pattern. If it is set NULL, $search_pattern will be replaced by empty (""). |
boolean |
$recursive: |
If set to TRUE, content of the given directory and all its sub directories will be added to the archive. Otherwise only the content of directory is added. Has no effect $path is a file. |
API Tags:
Return: | TRUE if zipping was successful. |
Access: | public |
Information Tags: