Class ObservableFile

A file that may be watched for changes at runtime.

class ObservableFile
  : File ;

Constructors

NameDescription
this (filePath, hotReload)

Fields

NameTypeDescription
hotReload const(bool)Whether this file is being watched for changes.
onChanged Event!(const(ubyte)[])Fired if the file is being actively watched and when the file's contents change.
onDeleted Event!(string)Fired if the file is being actively watched and when the file was deleted.
contents const(ubyte)[]Contents of this file.
filePath const(string)Path to this file.

Properties

NameTypeDescription
exists[get] const(bool)Whether this file exists. The file could not have been found initially, later moved, or deleted.

See Also

File