struct

ECS::LogEntry::File

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(pull : JSON::PullParser)
Source
new

Initialize all values as nil

Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

accessed(new_value : Time)

A chainable setter for accessed

Source
accessed

file.accessed

Last time the file was accessed.

Note that not all filesystems keep track of access time.

Level: Extended Type: Date

Source
accessed=(accessed : Time | Nil)

file.accessed

Last time the file was accessed.

Note that not all filesystems keep track of access time.

Level: Extended Type: Date

Source
attributes(new_value : String)

A chainable setter for attributes

Source
attributes

file.attributes

Array of file attributes.

Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.

Level: Extended Type: Keyword Example:

["readonly", "system"]
Source
attributes=(attributes : String | Nil)

file.attributes

Array of file attributes.

Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.

Level: Extended Type: Keyword Example:

["readonly", "system"]
Source
codesignature(value : CodeSignature)

A chainable setter for codesignature

Source
codesignature
Source
codesignature

Initialize a new CodeSignature, yield it to the block

Source
codesignature=(codesignature : CodeSignature | Nil)
Source
created(new_value : Time)

A chainable setter for created

Source
created

file.created

File creation time.

Note that not all filesystems store the creation time.

Level: Extended Type: Date

Source
created=(created : Time | Nil)

file.created

File creation time.

Note that not all filesystems store the creation time.

Level: Extended Type: Date

Source
ctime(new_value : Time)

A chainable setter for ctime

Source
ctime

file.ctime

Last time the file attributes or metadata changed.

Note that changes to the file content will update mtime. This implies ctime will be adjusted at the same time, since mtime is an attribute of the file.

Level: Extended Type: Date

Source
ctime=(ctime : Time | Nil)

file.ctime

Last time the file attributes or metadata changed.

Note that changes to the file content will update mtime. This implies ctime will be adjusted at the same time, since mtime is an attribute of the file.

Level: Extended Type: Date

Source
device(new_value : String)

A chainable setter for device

Source
device

file.device

Device that is the source of the file.

Level: Extended Type: Keyword Example:

sda
Source
device=(device : String | Nil)

file.device

Device that is the source of the file.

Level: Extended Type: Keyword Example:

sda
Source
directory(new_value : String)

A chainable setter for directory

Source
directory

file.directory

Directory where the file is located. It should include the drive letter, when appropriate.

Level: Extended Type: Keyword Example:

/home/alice
Source
directory=(directory : String | Nil)

file.directory

Directory where the file is located. It should include the drive letter, when appropriate.

Level: Extended Type: Keyword Example:

/home/alice
Source
drive_letter(new_value : String)

A chainable setter for drive_letter

Source
drive_letter

file.drive_letter

Drive letter where the file is located. This field is only relevant on Windows.

The value should be uppercase, and not include the colon.

Level: Extended Type: Keyword Example:

C
Source
drive_letter=(drive_letter : String | Nil)

file.drive_letter

Drive letter where the file is located. This field is only relevant on Windows.

The value should be uppercase, and not include the colon.

Level: Extended Type: Keyword Example:

C
Source
extension(new_value : String)

A chainable setter for extension

Source
extension

file.extension

File extension.

Level: Extended Type: Keyword Example:

png
Source
extension=(extension : String | Nil)

file.extension

File extension.

Level: Extended Type: Keyword Example:

png
Source
gid(new_value : String)

A chainable setter for gid

Source
gid

file.gid

Primary group ID (GID) of the file.

Level: Extended Type: Keyword Example:

1001
Source
gid=(gid : String | Nil)

file.gid

Primary group ID (GID) of the file.

Level: Extended Type: Keyword Example:

1001
Source
group(new_value : String)

A chainable setter for group

Source
group

file.group

Primary group name of the file.

Level: Extended Type: Keyword Example:

alice
Source
group=(group : String | Nil)

file.group

Primary group name of the file.

Level: Extended Type: Keyword Example:

alice
Source
hash(value : Hash)

A chainable setter for hash

Source
hash

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with == by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.

Source
hash

Initialize a new Hash, yield it to the block

Source
hash=(hash : Hash | Nil)
Source
inode(new_value : String)

A chainable setter for inode

Source
inode

file.inode

Inode representing the file in the filesystem.

Level: Extended Type: Keyword Example:

256383
Source
inode=(inode : String | Nil)

file.inode

Inode representing the file in the filesystem.

Level: Extended Type: Keyword Example:

256383
Source
mime_type(new_value : String)

A chainable setter for mime_type

Source
mime_type

file.mime_type

MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.

Level: Extended Type: Keyword

Source
mime_type=(mime_type : String | Nil)

file.mime_type

MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.

Level: Extended Type: Keyword

Source
mode(new_value : String)

A chainable setter for mode

Source
mode

file.mode

Mode of the file in octal representation.

Level: Extended Type: Keyword Example:

0640
Source
mode=(mode : String | Nil)

file.mode

Mode of the file in octal representation.

Level: Extended Type: Keyword Example:

0640
Source
mtime(new_value : Time)

A chainable setter for mtime

Source
mtime

file.mtime

Last time the file content was modified.

Level: Extended Type: Date

Source
mtime=(mtime : Time | Nil)

file.mtime

Last time the file content was modified.

Level: Extended Type: Date

Source
name(new_value : String)

A chainable setter for name

Source
name

file.name

Name of the file including the extension, without the directory.

Level: Extended Type: Keyword Example:

example.png
Source
name=(name : String | Nil)

file.name

Name of the file including the extension, without the directory.

Level: Extended Type: Keyword Example:

example.png
Source
owner(new_value : String)

A chainable setter for owner

Source
owner

file.owner

File owner's username.

Level: Extended Type: Keyword Example:

alice
Source
owner=(owner : String | Nil)

file.owner

File owner's username.

Level: Extended Type: Keyword Example:

alice
Source
path(new_value : String)

A chainable setter for path

Source
path

file.path

Full path to the file, including the file name. It should include the drive letter, when appropriate.

Level: Extended Type: Keyword Example:

/home/alice/example.png
Source
path=(path : String | Nil)

file.path

Full path to the file, including the file name. It should include the drive letter, when appropriate.

Level: Extended Type: Keyword Example:

/home/alice/example.png
Source
pe(value : Pe)

A chainable setter for pe

Source
pe

Initialize a new Pe, yield it to the block

Source
pe=(pe : Pe | Nil)
Source
size(new_value : UInt64)

A chainable setter for size

Source
size

file.size

File size in bytes.

Only relevant when file.type is "file".

Level: Extended Type: Long Example:

16384
Source
size=(size : UInt64 | Nil)

file.size

File size in bytes.

Only relevant when file.type is "file".

Level: Extended Type: Long Example:

16384
Source
target_path(new_value : String)

A chainable setter for target_path

Source
target_path

file.target_path

Target path for symlinks.

Level: Extended Type: Keyword

Source
target_path=(target_path : String | Nil)

file.target_path

Target path for symlinks.

Level: Extended Type: Keyword

Source
type(new_value : String)

A chainable setter for type

Source
type

file.type

File type (file, dir, or symlink).

Level: Extended Type: Keyword Example:

file
Source
type=(type : String | Nil)

file.type

File type (file, dir, or symlink).

Level: Extended Type: Keyword Example:

file
Source
uid(new_value : String)

A chainable setter for uid

Source
uid

file.uid

The user ID (UID) or security identifier (SID) of the file owner.

Level: Extended Type: Keyword Example:

1001
Source
uid=(uid : String | Nil)

file.uid

The user ID (UID) or security identifier (SID) of the file owner.

Level: Extended Type: Keyword Example:

1001
Source
x509(value : X509)

A chainable setter for x509

Source
x509
Source
x509

Initialize a new X509, yield it to the block

Source
x509=(x509 : X509 | Nil)
Source

Nested types