class Tarball::Entity

Overview

File system objects(regular files, directries or links) in the tar archive.

Tarball::Entity object must contain an entity body entry with one of following entry types:

It can contain one each of Tarball::Entry::Type::LONGNAME (GNUTAR long name) entry, a Tarball::Entry::Type::LONGNAME (GNUTAR long linkname) entry, Tarball::Entry::Type::PAXDATA (PAX header) entry.

Included Modules

Defined in:

tarball/entity.cr

Instance Method Summary

Instance Method Detail

def <=>(other : self) #

[View source]
def add_entry(entry : Entry) #

Adds tar file entry to this entity.


[View source]
def directory? #

Returns true when self is a directory.


[View source]
def file? #

Returns true when self is a regular file.


[View source]
def gid #

Returns owner group id of this entity.


[View source]
def hardlink? #

Returns true when self is a hardlink.


[View source]
def has_body? #

Returns true when entity body has been set.


[View source]
def has_long_linkname? #

Returns true when entity body has been set.


[View source]
def has_long_name? #

Returns true when entity body has been set.


[View source]
def linkname #

Returns file or directory name that this entity links to.

#linkname is only used when the entity body is Entry::Type::HARDLINK or Entry::Type::SYMLINK.


[View source]
def mtime #

Returns last modified timestamp of this entity.


[View source]
def name #

Returns file or directory name of this entity.


[View source]
def symlink? #

Returns true when self is a symlink.


[View source]
def uid #

Returns owner user id of this entity.


[View source]
def write_content(io : IO) #

Writes content data to IO.


[View source]