Rar ArchivingTable of Contents
The RarArchive classIntroductionThis class represents a RAR archive, which may be formed by several volumes (parts) and which contains a number of RAR entries (i.e., files, directories and other special objects such as symbolic links). Objects of this class can be traversed, yielding the entries stored in the respective RAR archive. Those entries can also be obtained through RarArchive::getEntry and RarArchive::getEntries. Class synopsisRarArchive
final
class RarArchive
implements
Traversable
{
/* Methods */
public bool close
( void
)
public string getComment
( void
)
public array getEntries
( void
)
public RarEntry getEntry
( string
$entryname
)
public bool isBroken
( void
)
public bool isSolid
( void
)
public static RarArchive open
( string
$filename
[, string $password = NULL
[, callable $volume_callback = NULL
]] )
public bool setAllowBroken
( bool
$allow_broken
)
public string __toString
( void
)
}The RarEntry classIntroductionA RAR entry, representing a directory or a compressed file inside a RAR archive. Class synopsisRarEntry
final
class RarEntry
{
/* 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
;
/* Methods */
public bool extract
( string
$dir
[, string $filepath = ""
[, string $password = NULL
[, bool $extended_data = false
]]] )
public int getAttr
( void
)
public string getCrc
( void
)
public string getFileTime
( void
)
public int getHostOs
( void
)
public int getMethod
( void
)
public string getName
( void
)
public int getPackedSize
( void
)
public resource getStream
([ string
$password
] )
public int getUnpackedSize
( void
)
public int getVersion
( void
)
public bool isDirectory
( void
)
public bool isEncrypted
( void
)
public string __toString
( void
)
}Predefined Constants
The RarException classIntroductionThis class serves two purposes: it is the type of the exceptions thrown by the RAR extension functions and methods and it allows, through static methods to query and define the error behaviour of the extension, i.e., whether exceptions are thrown or only warnings are emitted. The following error codes are used:
Class synopsisRarException
final
class RarException
extends
Exception
{
/* Methods */
public static bool isUsingExceptions
( void
)
public static void setUsingExceptions
( bool
$using_exceptions
)/* Inherited methods */
final public string Exception::getMessage
( void
)
final public Throwable Exception::getPrevious
( void
)
final public mixed Exception::getCode
( void
)
final public string Exception::getFile
( void
)
final public int Exception::getLine
( void
)
final public array Exception::getTrace
( void
)
final public string Exception::getTraceAsString
( void
)
public string Exception::__toString
( void
)
final private void Exception::__clone
( void
)
} |