Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Jun 29, 2023
1 parent 506947f commit c987131
Showing 1 changed file with 44 additions and 41 deletions.
85 changes: 44 additions & 41 deletions docs/API.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
This file describes all UnifiedArchive API.

# TOC

UnifiedArchive is represented by few basic classes under `\wapmorgan\UnifiedArchive` namespace:

1. [`Formats`](#Formats) keeps information about formats support and specific format functions.
2. [`UnifiedArchive`](#UnifiedArchive) - represents an archive and provides related functions.
3. [`ArchiveEntry`](#ArchiveEntry) - represents information about a specific file from archive. This object can be obtained
by call to one of `UnifiedArchive` methods.
2. [`Abilities`](#Abilities) list.
3. [`UnifiedArchive`](#UnifiedArchive) - represents an archive and provides related functions.
4. [`ArchiveEntry`](#ArchiveEntry) - represents information about a specific file from archive. This object can be obtained
by call `UnifiedArchive->getFileData()` method.

# Formats

Expand All @@ -24,6 +27,44 @@ All methods are static.
| `Formats::can` | `string $format, int $ability` | `boolean` | Check if any driver supports passed [ability](#abilities) for passed format |
| `Formats::canOpen`, `Formats::canStream`, `Formats::canCreate`, `Formats::canAppend`, `Formats::canUpdate`, `Formats::canEncrypt` | `string $format` | `boolean` | Tests if an archive format can be opened/created/appended (`add`)/updated (`delete`)/created encrypted by any driver with current system and php configuration. |

### Formats list
- `Formats::ZIP`
- `Formats::SEVEN_ZIP`
- `Formats::RAR`
- `Formats::CAB`
- `Formats::TAR`
- `Formats::TAR_GZIP`
- `Formats::TAR_BZIP`
- `Formats::TAR_LZMA`
- `Formats::TAR_LZW`
- `Formats::ARJ`
- `Formats::GZIP`
- `Formats::BZIP`
- `Formats::LZMA`
- `Formats::UEFI`
- `Formats::GPT`
- `Formats::MBR`
- `Formats::MSI`
- `Formats::ISO`
- `Formats::DMG`
- `Formats::UDF`
- `Formats::RPM`
- `Formats::DEB`

### Abilities
- `Abilities::OPEN`
- `Abilities::OPEN_ENCRYPTED`
- `Abilities::OPEN_VOLUMED`
- `Abilities::GET_COMMENT`
- `Abilities::EXTRACT_CONTENT`
- `Abilities::STREAM_CONTENT`
- `Abilities::SET_COMMENT`
- `Abilities::APPEND`
- `Abilities::DELETE`
- `Abilities::CREATE`
- `Abilities::CREATE_ENCRYPTED`
- `Abilities::CREATE_IN_STRING`

# UnifiedArchive

- Opening an archive
Expand Down Expand Up @@ -289,41 +330,3 @@ It contains fields with file information:
- `integer $compressedSize` - size of the file with compression in bytes.
- `integer $uncompressedSize` - size of the file without compression in bytes.
since the beginning of an era of Unix).

### Formats list
- `Formats::ZIP`
- `Formats::SEVEN_ZIP`
- `Formats::RAR`
- `Formats::CAB`
- `Formats::TAR`
- `Formats::TAR_GZIP`
- `Formats::TAR_BZIP`
- `Formats::TAR_LZMA`
- `Formats::TAR_LZW`
- `Formats::ARJ`
- `Formats::GZIP`
- `Formats::BZIP`
- `Formats::LZMA`
- `Formats::UEFI`
- `Formats::GPT`
- `Formats::MBR`
- `Formats::MSI`
- `Formats::ISO`
- `Formats::DMG`
- `Formats::UDF`
- `Formats::RPM`
- `Formats::DEB`

### Abilities
- `Abilities::OPEN`
- `Abilities::OPEN_ENCRYPTED`
- `Abilities::OPEN_VOLUMED`
- `Abilities::GET_COMMENT`
- `Abilities::EXTRACT_CONTENT`
- `Abilities::STREAM_CONTENT`
- `Abilities::SET_COMMENT`
- `Abilities::APPEND`
- `Abilities::DELETE`
- `Abilities::CREATE`
- `Abilities::CREATE_ENCRYPTED`
- `Abilities::CREATE_IN_STRING`

0 comments on commit c987131

Please sign in to comment.