Options
All
  • Public
  • Public/Protected
  • All
Menu

Used by RotatingFileStream to make write transactions and determine when to rotate files.

Hierarchy

  • FileEntryLike

Implemented by

Index

Methods

getDirectoryName

  • getDirectoryName(): string

getFileName

  • getFileName(): string

getLastModificationTime

  • getLastModificationTime(): number
  • The last time this entry was edited. This is used to determine which files are the oldest when a rotation happens and all files are full.

    Returns number

getSize

  • getSize(): number
  • The current size in bytes of this entry. Used to determine if the stream needs to rotate to a new entry.

    Returns number

read

  • read(): Promise<ArrayBuffer>
  • Option to read the entire entry contents from disk. Not actively used in the process, but a nice-to-have when interfacing with entries.

    Returns Promise<ArrayBuffer>

refresh

  • refresh(): Promise<void>
  • Called when the entry should refresh its metadata, including size and last modification time.

    Returns Promise<void>

toURL

  • toURL(): string

write

  • write(data: ArrayBuffer, overwrite: boolean): Promise<void>
  • Called when the entry is being overwritten or appened to.

    Parameters

    • data: ArrayBuffer

      the buffer to write to disk

    • overwrite: boolean

      if this write should erase existing data

    Returns Promise<void>

Generated using TypeDoc