client for test
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import { promises as fs, watch, FSWatcher } from 'fs'
|
||||
import path from 'path'
|
||||
import { JsonDatabase } from '../database/database'
|
||||
import { DatabaseScheme } from '../database/schemes/database_scheme'
|
||||
import { Database } from '../database/database'
|
||||
|
||||
export class DirectoryWatcher {
|
||||
private readonly watchers: Map<string, FSWatcher> // Stores watchers with directory ID as the key
|
||||
private readonly db: JsonDatabase<DatabaseScheme, any>
|
||||
private readonly db: Database
|
||||
private totalSizes: Map<string, number> // Stores total sizes per directory ID
|
||||
|
||||
constructor(pathToDatabaseFile: string) {
|
||||
this.db = new JsonDatabase<DatabaseScheme, any>(pathToDatabaseFile)
|
||||
this.db = new Database(pathToDatabaseFile)
|
||||
this.watchers = new Map<string, FSWatcher>()
|
||||
this.totalSizes = new Map<string, number>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user