![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYlibzip (-lzip) SYNOPSIS
int
DESCRIPTIONThe
The following operating systems are defined by the zip specification:
The defines above follow the PKWARE Inc. Appnote; please note that the InfoZIP Appnote has a slightly different mapping. RETURN VALUESUpon successful completion, 0 is returned. In case of an error,
EXAMPLESThe following code can be used to expand
attributes if the operating system is
#include <sys/stat.h> #define FA_RDONLY 0x01 // FILE_ATTRIBUTE_READONLY #define FA_DIREC 0x10 // FILE_ATTRIBUTE_DIRECTORY static mode_t _zip_dos_attr2mode(zip_uint32_t attr) { mode_t m = S_IRUSR | S_IRGRP | S_IROTH; if (0 == (attr & FA_RDONLY)) m |= S_IWUSR | S_IWGRP | S_IWOTH; if (attr & FA_DIREC) m = (S_IFDIR | (m & ~S_IFMT)) | S_IXUSR | S_IXGRP | S_IXOTH; return m; } ERRORS
SEE ALSOHISTORY
AUTHORSDieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>
|