Module: filterStorage

Classes

FilterStorage
FilterStorageError

Members

(static) filterStorage :module:filterStorage~FilterStorage

Reads the user's filters from disk, manages them in memory, and writes them back to disk.

Type:
Source:

(private, inner) backupQueue :Promise.<void>

An asynchronous guard for multiple backups renmaing operations. It gets reassigned to a new Promise that rename all backups one more time.

Type:
  • Promise.<void>
Source:

(inner, constant) FORMAT_VERSION :number

Version number of the filter storage file format.

Type:
  • number
Source:

(private, inner) stats :Map.<string, Stats>

A cache for all source files and backup stats.

Type:
  • Map.<string, Stats>
Source:

Methods

(async, inner) renameFile(source, dest)

Given a source path and a destination path, tries to rename the source and, if it succeed, remove the source from the stats and set stats for dest.

Parameters:
Name Type Description
source string
dest string
Source:

(async, inner) statFile(path) → {Stats}

Given a path, return its stats, if known, or a Stats object with properties exists = false and lastModified = 0.

Parameters:
Name Type Description
path string
Source:
Returns:
Type
Stats

Type Definitions

FileInfo

Type:
  • Object
Properties:
Name Type Description
index number
lastModified number
Source:

Stats

Type:
  • Object
Properties:
Name Type Description
exists boolean
lastModified number
Source:

TextSink(linenullable)

Parameters:
Name Type Attributes Description
line string <nullable>
Source: