From 2ef641d354cc0546add23a5088357651e1db8165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Tue, 1 Dec 2009 20:36:23 +0000 Subject: [PATCH] Updated RAR documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291570 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/rar/book.xml | 2 +- reference/rar/constants.xml | 12 +- reference/rar/examples.xml | 2 +- reference/rar/functions/rar-close.xml | 6 +- reference/rar/functions/rar-comment-get.xml | 6 +- reference/rar/functions/rar-entry-get.xml | 6 +- reference/rar/functions/rar-list.xml | 6 +- reference/rar/functions/rar-open.xml | 4 +- reference/rar/ini.xml | 2 +- reference/rar/rarentry.xml | 758 +++++++++++++++++- reference/rar/rarentry/extract.xml | 47 +- reference/rar/rarentry/getattr.xml | 32 +- reference/rar/rarentry/getcrc.xml | 27 +- reference/rar/rarentry/getfiletime.xml | 25 +- reference/rar/rarentry/gethostos.xml | 75 +- reference/rar/rarentry/getmethod.xml | 29 +- reference/rar/rarentry/getname.xml | 29 +- reference/rar/rarentry/getpackedsize.xml | 25 +- reference/rar/rarentry/getstream.xml | 55 +- reference/rar/rarentry/getunpackedsize.xml | 25 +- reference/rar/rarentry/getversion.xml | 30 +- .../{isDirectory.xml => isdirectory.xml} | 31 +- reference/rar/rarentry/isencrypted.xml | 58 ++ reference/rar/rarentry/tostring.xml | 58 ++ reference/rar/reference.xml | 2 +- reference/rar/setup.xml | 2 +- reference/rar/versions.xml | 4 +- 27 files changed, 1172 insertions(+), 186 deletions(-) rename reference/rar/rarentry/{isDirectory.xml => isdirectory.xml} (67%) create mode 100644 reference/rar/rarentry/isencrypted.xml create mode 100644 reference/rar/rarentry/tostring.xml diff --git a/reference/rar/book.xml b/reference/rar/book.xml index 662b700d5d..595102f169 100644 --- a/reference/rar/book.xml +++ b/reference/rar/book.xml @@ -43,7 +43,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/constants.xml b/reference/rar/constants.xml index 5431ca3183..1e41d40e86 100644 --- a/reference/rar/constants.xml +++ b/reference/rar/constants.xml @@ -12,7 +12,7 @@ - + Use RarEntry::HOST_MSDOS instead. @@ -23,7 +23,7 @@ - + Use RarEntry::HOST_OS2 instead. @@ -34,7 +34,7 @@ - + Use RarEntry::HOST_WIN32 instead. @@ -45,7 +45,7 @@ - + Use RarEntry::HOST_UNIX instead. @@ -56,7 +56,7 @@ - + Use RarEntry::HOST_BEOS instead. @@ -74,7 +74,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/examples.xml b/reference/rar/examples.xml index 2a1d7a6b26..f47a685eba 100644 --- a/reference/rar/examples.xml +++ b/reference/rar/examples.xml @@ -46,7 +46,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/functions/rar-close.xml b/reference/rar/functions/rar-close.xml index 92ed131356..42e23fe3f7 100644 --- a/reference/rar/functions/rar-close.xml +++ b/reference/rar/functions/rar-close.xml @@ -3,7 +3,7 @@ rar_close - Close Rar archive and free all resources + Close RAR archive and free all resources. @@ -13,7 +13,7 @@ resourcerar_file - Close Rar archive and free all allocated resources. + Close RAR archive and free all allocated resources. @@ -79,7 +79,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/functions/rar-comment-get.xml b/reference/rar/functions/rar-comment-get.xml index f26b638306..f0f0fdb783 100644 --- a/reference/rar/functions/rar-comment-get.xml +++ b/reference/rar/functions/rar-comment-get.xml @@ -3,7 +3,7 @@ rar_comment_get - Get comment text from the Rar archive + Get comment text from the RAR archive. @@ -13,7 +13,7 @@ resourcerar_file - Get the comment stored in the Rar archive. It may be up to 64 KiB long. + Get the comment stored in the RAR archive. It may be up to 64 KiB long. @@ -60,7 +60,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/functions/rar-entry-get.xml b/reference/rar/functions/rar-entry-get.xml index aad5a1c4b2..c51a7cd292 100644 --- a/reference/rar/functions/rar-entry-get.xml +++ b/reference/rar/functions/rar-entry-get.xml @@ -3,7 +3,7 @@ rar_entry_get - Get entry object from the Rar archive + Get entry object from the RAR archive. @@ -14,7 +14,7 @@ stringentry_name - Get entry object (file or directory) from the Rar archive. + Get entry object (file or directory) from the RAR archive. @@ -92,7 +92,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/functions/rar-list.xml b/reference/rar/functions/rar-list.xml index ae8cf2b47e..60b8993588 100644 --- a/reference/rar/functions/rar-list.xml +++ b/reference/rar/functions/rar-list.xml @@ -3,7 +3,7 @@ rar_list - Get entries list from the Rar archive + Get entries list from the RAR archive. @@ -13,7 +13,7 @@ resourcerar_file - Get entries list (files and directories) from the Rar archive. + Get entries list (files and directories) from the RAR archive. @@ -76,7 +76,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/functions/rar-open.xml b/reference/rar/functions/rar-open.xml index a9aa471bb7..4b2813d429 100644 --- a/reference/rar/functions/rar-open.xml +++ b/reference/rar/functions/rar-open.xml @@ -3,7 +3,7 @@ rar_open - Open Rar archive + Open RAR archive. @@ -66,7 +66,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/ini.xml b/reference/rar/ini.xml index f09972e5f3..17fb1ea7a6 100644 --- a/reference/rar/ini.xml +++ b/reference/rar/ini.xml @@ -16,7 +16,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry.xml b/reference/rar/rarentry.xml index 01b51eb022..6d04218e5a 100644 --- a/reference/rar/rarentry.xml +++ b/reference/rar/rarentry.xml @@ -1,20 +1,22 @@ - + + + The <classname>RarEntry</classname> class RarEntry - + - +
&reftitle.intro; - A Rar entry, representing a directory or a compressed file inside a Rar archive. + A RAR entry, representing a directory or a compressed file inside a RAR archive.
- +
&reftitle.classsynopsis; @@ -29,24 +31,761 @@ + Constants + + const + integer + RarEntry::HOST_MSDOS + 0 + + + const + integer + RarEntry::HOST_OS2 + 1 + + + const + integer + RarEntry::HOST_WIN32 + 2 + + + const + integer + RarEntry::HOST_UNIX + 3 + + + const + integer + RarEntry::HOST_MACOS + 4 + + + const + integer + RarEntry::HOST_BEOS + 5 + + + const + integer + RarEntry::ATTRIBUTE_WIN_READONLY + 1 + + + const + integer + RarEntry::ATTRIBUTE_WIN_HIDDEN + 2 + + + const + integer + RarEntry::ATTRIBUTE_WIN_SYSTEM + 4 + + + const + integer + RarEntry::ATTRIBUTE_WIN_DIRECTORY + 16 + + + const + integer + RarEntry::ATTRIBUTE_WIN_ARCHIVE + 32 + + + const + integer + RarEntry::ATTRIBUTE_WIN_DEVICE + 64 + + + const + integer + RarEntry::ATTRIBUTE_WIN_NORMAL + 128 + + + const + integer + RarEntry::ATTRIBUTE_WIN_TEMPORARY + 256 + + + const + integer + RarEntry::ATTRIBUTE_WIN_SPARSE_FILE + 512 + + + const + integer + RarEntry::ATTRIBUTE_WIN_REPARSE_POINT + 1024 + + + const + integer + RarEntry::ATTRIBUTE_WIN_COMPRESSED + 2048 + + + const + integer + RarEntry::ATTRIBUTE_WIN_OFFLINE + 4096 + + + const + integer + RarEntry::ATTRIBUTE_WIN_NOT_CONTENT_INDEXED + 8192 + + + const + integer + RarEntry::ATTRIBUTE_WIN_ENCRYPTED + 16384 + + + const + integer + RarEntry::ATTRIBUTE_WIN_VIRTUAL + 65536 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_WORLD_EXECUTE + 1 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_WORLD_WRITE + 2 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_WORLD_READ + 4 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_GROUP_EXECUTE + 8 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_GROUP_WRITE + 16 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_GROUP_READ + 32 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_OWNER_EXECUTE + 64 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_OWNER_WRITE + 128 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_OWNER_READ + 256 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_STICKY + 512 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_SETGID + 1024 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_SETUID + 2048 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET + 61440 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_FIFO + 4096 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_CHAR_DEV + 8192 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_DIRECTORY + 16384 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_BLOCK_DEV + 24576 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_REGULAR_FILE + 32768 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_SYM_LINK + 40960 + + + const + integer + RarEntry::ATTRIBUTE_UNIX_SOCKET + 49152 + + Properties + + private + rarfile + + + private + name + + + private + unpacked_size + + + private + packed_size + + + private + host_os + + + private + file_time + + + private + crc + + + private + attr + + + private + version + + + private + method + + + private + flags + Methods -
-
+ + +
+ &reftitle.properties; + + + rarfile + + Used internally to hold a reference to the RAR file resource. It is not part of the contract. + + + + name + + Used internally to store the UTF-8 encoded entry name. It is not part of the contract. + + + + unpacked_size + + Used internally to store the unpacked entry size. It is not part of the contract. + + + + packed_size + + Used internally to store the packed entry size. It is not part of the contract. + + + + host_os + + Used internally to store the host OS. It is not part of the contract. + + + + file_time + + Used internally to store the last modification time of the entry. It is not part of the contract. + + + + crc + + Used internally to store the entry's hexadecimal string representation of its CRC. It is not part of the contract. + + + + attr + + Used internally to store the entry's attributes. It is not part of the contract. + + + + version + + Used internally to store the minimum RAR version needed to unpack the entry. + It is encoded as 10 * Major version + minor version. This property is not part of the contract. + + + + method + + Used internally to store the method used to pack the entry. It is not part of the contract. + + + + flags + + Used internally to store several entry properties, such as dictionary size, whether it's a directory, + is encrypted, is continued in the previous or next volume, is solid or has a comment. Again, not part of the contract. + + + +
+ + + +
+ &reftitle.constants; +
+ RarEntry Node Types + + + + RarEntry::HOST_MSDOS + + If the return value of RarEntry::getHostOs equals this constant, MS-DOS was used to + add this entry. Use instead of RAR_HOST_MSDOS. + + + + + RarEntry::HOST_OS2 + + If the return value of RarEntry::getHostOs equals this constant, OS/2 was used to + add this entry. Intended to replace RAR_HOST_OS2. + + + + + RarEntry::HOST_WIN32 + + If the return value of RarEntry::getHostOs equals this constant, Microsoft Windows was used to + add this entry. Intended to replace RAR_HOST_WIN32. + + + + + RarEntry::HOST_UNIX + + If the return value of RarEntry::getHostOs equals this constant, an unspecified UNIX OS was used to + add this entry. Intended to replace RAR_HOST_UNIX. + + + + + RarEntry::HOST_MACOS + + If the return value of RarEntry::getHostOs equals this constant, Mac OS was used to + add this entry. + + + + + RarEntry::HOST_BEOS + + If the return value of RarEntry::getHostOs equals this constant, BeOS was used to + add this entry. Intended to replace RAR_HOST_BEOS. + + + + + RarEntry::ATTRIBUTE_WIN_READONLY + + Bit that represents a Windows entry with a read-only attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_HIDDEN + + Bit that represents a Windows entry with a hidden attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_SYSTEM + + Bit that represents a Windows entry with a system attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_DIRECTORY + + Bit that represents a Windows entry with a directory attribute (entry is a directory). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. See also + RarEntry::isDirectory, which also works with entries that were not added in WinRAR. + + + + + RarEntry::ATTRIBUTE_WIN_ARCHIVE + + Bit that represents a Windows entry with an archive attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_DEVICE + + Bit that represents a Windows entry with a device attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_NORMAL + + Bit that represents a Windows entry with a normal file attribute (entry is NOT a directory). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. See also + RarEntry::isDirectory, which also works with entries that were not added in WinRAR. + + + + + RarEntry::ATTRIBUTE_WIN_TEMPORARY + + Bit that represents a Windows entry with a temporary attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_SPARSE_FILE + + Bit that represents a Windows entry with a sparse file attribute (file is an NTFS sparse file). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_REPARSE_POINT + + Bit that represents a Windows entry with a reparse point attribute (entry is an NTFS reparse point, e.g. a + directory junction or a mount file system). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_COMPRESSED + + Bit that represents a Windows entry with a compressed attribute (NTFS only). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_OFFLINE + + Bit that represents a Windows entry with an offline attribute (entry is offline and not accessible). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_NOT_CONTENT_INDEXED + + Bit that represents a Windows entry with a not content indexed attribute (entry is to be indexed). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_ENCRYPTED + + Bit that represents a Windows entry with an encrypted attribute (NTFS only). To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_WIN_VIRTUAL + + Bit that represents a Windows entry with a virtual attribute. To be used with + RarEntry::getAttr on entries whose host OS is Microsoft Windows. + + + + + RarEntry::ATTRIBUTE_UNIX_WORLD_EXECUTE + + Bit that represents a UNIX entry that is world executable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_WORLD_WRITE + + Bit that represents a UNIX entry that is world writable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_WORLD_READ + + Bit that represents a UNIX entry that is world readable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_GROUP_EXECUTE + + Bit that represents a UNIX entry that is group executable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_GROUP_WRITE + + Bit that represents a UNIX entry that is group writable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_GROUP_READ + + Bit that represents a UNIX entry that is group readable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_OWNER_EXECUTE + + Bit that represents a UNIX entry that is owner executable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_OWNER_WRITE + + Bit that represents a UNIX entry that is owner writable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_OWNER_READ + + Bit that represents a UNIX entry that is owner readable. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_STICKY + + Bit that represents the UNIX sticky bit. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_SETGID + + Bit that represents the UNIX setgid attribute. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_SETUID + + Bit that represents the UNIX setuid attribute. To be used with + RarEntry::getAttr on entries whose host OS is UNIX. + + + + + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET + + Mask to isolate the last four bits of UNIX attributes. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constants RarEntry::ATTRIBUTE_UNIX_FIFO, + RarEntry::ATTRIBUTE_UNIX_CHAR_DEV, + RarEntry::ATTRIBUTE_UNIX_DIRECTORY, + RarEntry::ATTRIBUTE_UNIX_BLOCK_DEV, + RarEntry::ATTRIBUTE_UNIX_REGULAR_FILE, + RarEntry::ATTRIBUTE_UNIX_SYM_LINK and + RarEntry::ATTRIBUTE_UNIX_SOCKET. + + + + + RarEntry::ATTRIBUTE_UNIX_FIFO + + Unix FIFOs will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. + + + + + RarEntry::ATTRIBUTE_UNIX_CHAR_DEV + + Unix character devices will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. + + + + + RarEntry::ATTRIBUTE_UNIX_DIRECTORY + + Unix directories will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. See also + RarEntry::isDirectory, which also works with entries that + were added in other operating systems. + + + + + RarEntry::ATTRIBUTE_UNIX_BLOCK_DEV + + Unix block devices will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. + + + + + RarEntry::ATTRIBUTE_UNIX_REGULAR_FILE + + Unix regular files (not directories) will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. See also + RarEntry::isDirectory, which also works with entries that + were added in other operating systems. + + + + + RarEntry::ATTRIBUTE_UNIX_SYM_LINK + + Unix symbolic links will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. + + + + + RarEntry::ATTRIBUTE_UNIX_SOCKET + + Unix sockets will have attributes whose last four bits have this value. To be used with + RarEntry::getAttr on entries whose host OS is UNIX and with the + constant + RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET. + + + + +
+
+ + + + &reference.rar.entities.rarentry;
- + - diff --git a/reference/rar/rarentry/extract.xml b/reference/rar/rarentry/extract.xml index 74c12b7ee8..f2334b5551 100644 --- a/reference/rar/rarentry/extract.xml +++ b/reference/rar/rarentry/extract.xml @@ -1,25 +1,24 @@ - + - + RarEntry::extract - Extract entry from the archive + Extract entry from the archive. &reftitle.description; - - RarEntry - boolextract + public boolextract stringdir stringfilepath + stringpassword - - RarEntry::extract extracts entry's data to the - dir. It will create new file in the specified - dir with the name identical to the entry's name. + RarEntry::extract extracts the entry's data. + It will create new file in the specified + dir with the name identical to the entry's name, + unless the second argument is specified. See below for more information. @@ -38,6 +37,7 @@ + filepath @@ -48,6 +48,20 @@ + + + password + + + The password used to encrypt this entry. If the entry is not encrypted, this value will not be used and can + be omitted. If this parameter is omitted and the entry is encrypted, the password given to + rar_open, if any, will be used. If a wrong password is given, either explicitly + or implicitly via rar_open, CRC checking will fail and this method will fail and return &false;. + If no password is given and one is required, this method will fail and return &false;. + You can check whether an entry is encrypted with RarEntry::isEncrypted. + + + @@ -67,7 +81,7 @@ &reftitle.examples; - <function>RarEntry::extract</function> example + <methodname>RarEntry::extract</methodname> example
+ + + &reftitle.seealso; + + + RarEntry::getStream + + +
@@ -122,7 +145,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/getattr.xml b/reference/rar/rarentry/getattr.xml index 9227575ca2..af7bed6ff2 100644 --- a/reference/rar/rarentry/getattr.xml +++ b/reference/rar/rarentry/getattr.xml @@ -1,25 +1,26 @@ - + - + RarEntry::getAttr - Get attributes of the entry + Get attributes of the entry. &reftitle.description; - - RarEntry - - intgetAttr - - - + + public intgetAttr + + - RarEntry::getAttr returns attributes of the archive - entry. + Returns the OS-dependent attributes of the archive entry. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -32,7 +33,7 @@ &reftitle.examples; - <function>RarEntry::getAttr</function> example + <methodname>RarEntry::getAttr</methodname> example - + RarEntry::getHostOs + The constants in RarEntry @@ -116,7 +118,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/getcrc.xml b/reference/rar/rarentry/getcrc.xml index 44a644ed23..d1f2c84141 100644 --- a/reference/rar/rarentry/getcrc.xml +++ b/reference/rar/rarentry/getcrc.xml @@ -1,24 +1,27 @@ - + - + + RarEntry::getCrc - Get CRC of the entry + Get CRC of the entry. &reftitle.description; - - RarEntry - - intgetCrc - - - + + public stringgetCrc + + - RarEntry::getCrc returns CRC of the archive entry. + Returns an hexadecimal string representation of the CRC of the archive entry. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -64,7 +67,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/getfiletime.xml b/reference/rar/rarentry/getfiletime.xml index fdf1bc5960..c6ce3c62b1 100644 --- a/reference/rar/rarentry/getfiletime.xml +++ b/reference/rar/rarentry/getfiletime.xml @@ -1,24 +1,27 @@ - + - + + RarEntry::getFileTime - Get entry last modification time + Get entry last modification time. &reftitle.description; - - RarEntry - - stringgetFileTime - - - + + public stringgetFileTime + + Gets entry last modification time. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -41,7 +44,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/gethostos.xml b/reference/rar/rarentry/gethostos.xml index 95b366b2cc..c32b5d5a3a 100644 --- a/reference/rar/rarentry/gethostos.xml +++ b/reference/rar/rarentry/gethostos.xml @@ -1,25 +1,27 @@ - + - + + RarEntry::getHostOs - Get entry host OS + Get entry host OS. &reftitle.description; - - RarEntry - - intgetHostOs - - - + + public intgetHostOs + + - RarEntry::getHostOs return code of the host OS of the - archive entry. + Returns the code of the host OS of the archive entry. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -32,7 +34,43 @@ &reftitle.examples; - <function>RarEntry::getHostOs</function> example + <methodname>RarEntry::getHostOs</methodname> example (version >= 2.0.0) + +getHostOs()) { + case RarEntry::HOST_MSDOS: + echo "MS-DOS\n"; + break; + case RarEntry::HOST_OS2: + echo "OS2\n"; + break; + case RarEntry::HOST_WIN32: + echo "Win32\n"; + break; + case RarEntry::HOST_MACOS: + echo "MacOS\n"; + break; + case RarEntry::HOST_UNIX: + echo "Unix/Linux\n"; + break; + case RarEntry::HOST_BEOS: + echo "BeOS\n"; + break; +} + +?> +]]> + + + + + <methodname>RarEntry::getHostOs</methodname> example (version <= 1.0.0) getHostOs()) { + + + &reftitle.seealso; + + + RarEntry::extract + + + @@ -82,7 +129,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/getmethod.xml b/reference/rar/rarentry/getmethod.xml index 7db0ef7a41..1407e9a929 100644 --- a/reference/rar/rarentry/getmethod.xml +++ b/reference/rar/rarentry/getmethod.xml @@ -1,25 +1,28 @@ - + - + + RarEntry::getMethod - Get pack method of the entry + Get pack method of the entry. &reftitle.description; - - RarEntry - - intgetMethod - - - + + public intgetMethod + + - RarEntry::getMethod returns number of the method used when adding + RarEntry::getMethod returns number of the method used when adding current archive entry. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -32,7 +35,7 @@ &reftitle.examples; - <function>RarEntry::getMethod</function> example + <methodname>RarEntry::getMethod</methodname> example + - + + RarEntry::getName - Get name of the entry + Get name of the entry. &reftitle.description; - - RarEntry - - stringgetName - - - + + public stringgetName + + - RarEntry::getName returns the name (with path) of the archive entry. + Returns the name (with path) of the archive entry. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -55,7 +58,7 @@ &reftitle.examples; - <function>RarEntry::getName</function> example + <methodname>RarEntry::getName</methodname> example - + + RarEntry::getPackedSize - Get packed size of the entry + Get packed size of the entry. &reftitle.description; - - RarEntry - - intgetPackedSize - - - + + public intgetPackedSize + + Get packed size of the archive entry. @@ -24,6 +22,11 @@ PHP_INT_MAX. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -62,7 +65,7 @@ &reftitle.examples; - <function>RarEntry::getPackedSize</function> example + <methodname>RarEntry::getPackedSize</methodname> example - + + RarEntry::getStream Get file handler for entry. @@ -8,15 +9,12 @@ &reftitle.description; - - RarEntry - - stringgetStream - - - + + public resourceRarEntry::getStream + stringpassword + - RarEntry::getStream returns a file handler that + Returns a file handler that supports read operations. This handler provides on-the-fly decompression for this entry. @@ -24,6 +22,32 @@ The handler is not invalidated by calling rar_close. + + The resulting stream has no integrity verification. In particular, file corruption and + decryption with a wrong a key will not be detected. It is the programmer's responsability to use the entry's CRC + to check for integrity, if he so wishes. + + + + + &reftitle.parameters; + + + + password + + + The password used to encrypt this entry. If the entry is not encrypted, this value will not be used and can + be omitted. If this parameter is omitted and the entry is encrypted, the password given to + rar_open, if any, will be used. If a wrong password is given, either explicitly + or implicitly via rar_open, this method's resulting stream will produce wrong + output. If no password is given and one is required, this method will fail and return &false;. + You can check whether an entry is encrypted with RarEntry::isEncrypted. + + + + + @@ -37,7 +61,7 @@ &reftitle.examples; - <function>RarEntry::getStream</function> example + <methodname>RarEntry::getStream</methodname> example + + + &reftitle.seealso; + + + RarEntry::extract + + + @@ -86,7 +119,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/getunpackedsize.xml b/reference/rar/rarentry/getunpackedsize.xml index 07532cadfc..cbd53f23f1 100644 --- a/reference/rar/rarentry/getunpackedsize.xml +++ b/reference/rar/rarentry/getunpackedsize.xml @@ -1,20 +1,18 @@ - + + RarEntry::getUnpackedSize - Get unpacked size of the entry + Get unpacked size of the entry. &reftitle.description; - - RarEntry - - intgetUnpackedSize - - - + + public intgetUnpackedSize + + Get unpacked size of the archive entry. @@ -24,6 +22,11 @@ PHP_INT_MAX. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -62,7 +65,7 @@ &reftitle.returnvalues; - <function>RarEntry::getUnpackedSize</function> example + <methodname>RarEntry::getUnpackedSize</methodname> example - + + RarEntry::getVersion - Get version of the archiver used to add the entry + Get minimum version of RAR program required to unpack the entry. &reftitle.description; - - RarEntry - - intgetVersion - - - + + public intgetVersion + + - Get version of the archiver used to add the archive entry. + Returns minimum version of RAR program (e.g. WinRAR) required to unpack the entry. + It is encoded as 10 * major version + minor version. + + + &reftitle.parameters; + &no.function.parameters; + &reftitle.returnvalues; @@ -31,7 +35,7 @@ &reftitle.examples; - <function>RarEntry::getVersion</function> example + <methodname>RarEntry::getVersion</methodname> example getVersion(); +echo "Rar version required for unpacking: " . $entry->getVersion(); ?> ]]> @@ -62,7 +66,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/rarentry/isDirectory.xml b/reference/rar/rarentry/isdirectory.xml similarity index 67% rename from reference/rar/rarentry/isDirectory.xml rename to reference/rar/rarentry/isdirectory.xml index fed2dc82a8..8c0ab62ee3 100644 --- a/reference/rar/rarentry/isDirectory.xml +++ b/reference/rar/rarentry/isdirectory.xml @@ -1,25 +1,28 @@ - + - + + RarEntry::isDirectory - Test whether an entry represents a directory + Test whether an entry represents a directory. - + &reftitle.description; - - RarEntry - - boolisDirectory - - - + + public boolisDirectory + + - Test whether the entry is a directory. + Tests whether the current entry is a directory. + + &reftitle.parameters; + &no.function.parameters; + + &reftitle.returnvalues; @@ -32,7 +35,7 @@ This function is only available starting with version 2.0.0, but one can also test whether an entry is a directory by checking the entry attributes, - like this (only works for files compressed in Rar for Windows or Unix): + like this (only works for files compressed in RAR for Windows or Unix): + + + + + RarEntry::isEncrypted + Test whether an entry is encrypted. + + + + &reftitle.description; + + public boolRarEntry::isEncrypted + + + + Tests whether the current entry contents are encrypted. + + + The password used may differ between files inside the same RAR archive. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if the current entry is encrypted and &false; otherwise. + + + + + + + diff --git a/reference/rar/rarentry/tostring.xml b/reference/rar/rarentry/tostring.xml new file mode 100644 index 0000000000..f4983a07f9 --- /dev/null +++ b/reference/rar/rarentry/tostring.xml @@ -0,0 +1,58 @@ + + + + + + RarEntry::__toString + Get text representation of entry. + + + + &reftitle.description; + + public stringRarEntry::__toString + + + + RarEntry::__toString returns a textual representation for this entry. It includes whether + the entry is a file or a directory (symbolic links and other special objects will be treated as files), + the UTF-8 name of the entry and its CRC. The form and content of this representation may be changed in the future, + so they cannot be relied upon. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A textual representation for the entry. + + + + + + + diff --git a/reference/rar/reference.xml b/reference/rar/reference.xml index 4cd4d62a3d..4d004f3d68 100644 --- a/reference/rar/reference.xml +++ b/reference/rar/reference.xml @@ -18,7 +18,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/setup.xml b/reference/rar/setup.xml index c4b9dce64f..254d8cab78 100644 --- a/reference/rar/setup.xml +++ b/reference/rar/setup.xml @@ -72,7 +72,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil diff --git a/reference/rar/versions.xml b/reference/rar/versions.xml index d21d713fcd..e8bf52c95a 100644 --- a/reference/rar/versions.xml +++ b/reference/rar/versions.xml @@ -17,6 +17,8 @@ + + @@ -36,7 +38,7 @@ sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil