default: {
    read: ((fname) => Promise<Buffer>);
    write: ((fname, data) => Promise<void>);
}

Type declaration

  • read: ((fname) => Promise<Buffer>)
      • (fname): Promise<Buffer>
      • Read data from a file with locks and logs.

        Several backups and helper files used for logging are recognized, should be used in pair with write.

        Parameters

        • fname: string

          the name of the file

        Returns Promise<Buffer>

        data read from the file

  • write: ((fname, data) => Promise<void>)
      • (fname, data): Promise<void>
      • Write data to a file with locks and logs.

        Several backups and helper files used for logging are created, should be used in pair with read.

        Parameters

        • fname: string

          the name of the file

        • data: string | Buffer

          the data to write to the file

        Returns Promise<void>

Generated using TypeDoc