struct RPM::File

Overview

Represents information of a file or a directory stored in RPM db or RPM package

Defined in:

rpm/file.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path, digest, link_to, size, mtime, owner, group, rdev, mode, attr, state) #

[View source]

Instance Method Detail

def attr : FileAttrs #

RPM-specific File attributes


[View source]
def attr=(attr : FileAttrs) #

RPM-specific File attributes


[View source]
def digest : String #

(Cryptographic) Digest of the file

For directory, digest will be filled with 0.


[View source]
def digest=(digest : String) #

(Cryptographic) Digest of the file

For directory, digest will be filled with 0.


[View source]
def flags : ::File::Flags #

Returns extra mode bit flags which is set for the path


[View source]
def group : String #

Group's name


[View source]
def group=(group : String) #

Group's name


[View source]
def link_to : String #

Link destination of the symbolic link

If the file is not a symbolic link, #link_to will be an empty string.


[View source]
def link_to=(link_to : String) #

Link destination of the symbolic link

If the file is not a symbolic link, #link_to will be an empty string.


[View source]
def mode : UInt16 #

UNIX mode value


[View source]
def mode=(mode : UInt16) #

UNIX mode value


[View source]
def modification_time : Time #

Returns modification time.

Provided for interoperability with Crystal's File::Info, this method just return #mtime.


[View source]
def mtime : Time #

Modification time of a file


[View source]
def mtime=(mtime : Time) #

Modification time of a file


[View source]
def owner : String #

Owner's name


[View source]
def owner=(owner : String) #

Owner's name


[View source]
def path : String #

Fullpath to the file or the directory


[View source]
def path=(path : String) #

Fullpath to the file or the directory


[View source]
def permissions : ::File::Permissions #

Returns permissions of the path


[View source]
def rdev : UInt16 #

Device ID for special files

If the file is not a special file, #rdev will be 0.


[View source]
def rdev=(rdev : UInt16) #

Device ID for special files

If the file is not a special file, #rdev will be 0.


[View source]
def size : UInt32 #

Bytesize of a file


[View source]
def size=(size : UInt32) #

Bytesize of a file


[View source]
def state : FileState #

Current state of the file (missing, replaced, ...)


[View source]
def state=(state : FileState) #

Current state of the file (missing, replaced, ...)


[View source]
def type : ::File::Type #

Returns type of the path


[View source]