Resource

A representation of a file on the disk.

Constructors

this
this(ResourceId path, Status status, const(ubyte[]) checksum)
Undocumented in source.

Members

Aliases

Hash
alias Hash = SHA256

Digest to use to determine changes.

Enums

Status
enum Status
Undocumented in source.

Functions

opCmp
int opCmp(Resource rhs)
opEquals
bool opEquals(Resource rhs)

Compares the file path of this resource with another.

remove
void remove(bool dryRun)

Deletes the resource from disk.

toString
string toString()

Returns a string representation of this resource. This is just the path to the resource.

update
bool update()

Updates the last modified time and checksum of this resource. Returns true if anything changed.

Properties

identifier
inout(ResourceId) identifier [@property getter]

Returns the unique identifier for this vertex.

statusKnown
bool statusKnown [@property getter]

Returns true if the status of this resource is known.

toShortString
string toShortString [@property getter]

Returns a short string representation of the path.

Variables

checksum
DigestType!Hash checksum;

Checksum of the file.

path
ResourceId path;

File path to the resource. To ensure uniqueness, this should never be changed after construction.

status
Status status;

Status of the file.

Meta