TgzArchive
extends TarArchive
in package
implements
ArchiveInterface
{@inheritDoc} Implémentation spécifique au fichier .tgz|tar.gz.
Table of Contents
Interfaces
- ArchiveInterface
- Représenter un fichier d'archive.
Properties
- $filename : string|null
- $gz_compress : bool
- $source : NoDotFilterIterator
- $tar : PharData
Methods
- close() : bool
- Fermer la resource du fichier d'archive.
- compress() : bool
- Créer un fichier d'archive à partir d'une liste de fichiers.
- extractTo() : bool
- Extraire tout ou partie des fichiers d'une archive.
- getComment() : string
- Lire le commentaire associé à l'archive si il existe.
- list() : array<int, mixed>
- Indiquer les fichiers d'une archive.
- open() : int
- Ouvrir le fichier d'archive.
- remove() : bool
- Supprimer des fichiers de l'archive.
- setComment() : bool
- Associer un commentaire à l'archive.
Properties
$filename
protected
string|null
$filename
= null
$gz_compress
protected
bool
$gz_compress
= true
$source
protected
NoDotFilterIterator
$source
$tar
protected
PharData
$tar
Methods
close()
Fermer la resource du fichier d'archive.
public
close() : bool
Return values
boolcompress()
Créer un fichier d'archive à partir d'une liste de fichiers.
public
compress([string $source = '' ][, array<string|int, mixed> $files = [] ]) : bool
Parameters
- $source : string = ''
- $files : array<string|int, mixed> = []
-
Tableau des fichiers à ajouter à l'archive
Return values
boolextractTo()
Extraire tout ou partie des fichiers d'une archive.
public
extractTo([string $target = '' ][, array<string|int, mixed> $files = [] ]) : bool
Parameters
- $target : string = ''
-
Répertoire cible
- $files : array<string|int, mixed> = []
-
Tout les fichier si le tableau est vide
Return values
boolgetComment()
Lire le commentaire associé à l'archive si il existe.
public
getComment() : string
Tags
Return values
stringlist()
Indiquer les fichiers d'une archive.
public
list() : array<int, mixed>
Return values
array<int, mixed>open()
Ouvrir le fichier d'archive.
public
open(string $filename, string $mode) : int
Parameters
- $filename : string
-
Chemin vers le fichier d'archive
- $mode : string
-
Mode d'accès au fichier
Return values
int —Code d'erreur
remove()
Supprimer des fichiers de l'archive.
public
remove([array<string|int, mixed> $files = [] ]) : bool
Parameters
- $files : array<string|int, mixed> = []
Return values
boolsetComment()
Associer un commentaire à l'archive.
public
setComment(string $comment) : bool
Parameters
- $comment : string