class Tarball::Archive
- Tarball::Archive
- Reference
- Object
Overview
Tar archive file object.
Direct Known Subclasses
Defined in:
tarball/archive.crClass Method Summary
-
.open(archive_file : String)
Open tar archive from filename.
Instance Method Summary
-
#[](filename : String)
Returns entity from filename.
-
#[]?(filename : String)
Returns entity from filename.
- #close
- #closed? : Bool
- #each_entity
- #each_entity(&block)
-
#entities
Returns list of entities in archive.
-
#extract_all(dir = ".")
Extract all files to under the
dir
-
#extract_file(filename : String, path : String? = nil)
Extracts a file to specific path.
-
#filenames
Returns list of included filenames.
-
#format
Returns file format(
Tarball::Archive::Format
) of this archive -
#write_content(filename : String, io : IO)
Write content of a file to IO.
Class Method Detail
Instance Method Detail
def extract_file(filename : String, path : String? = nil)
#
Extracts a file to specific path.
If path
isn't given, default name is used.