mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-14 07:49:37 +00:00
Fix:Include Watcher as lib with no dependencies and fix tiny-readdir bug #610
This commit is contained in:
parent
160dac109d
commit
ec6e70725c
34 changed files with 2187 additions and 281 deletions
28
server/libs/watcher/atomically/consts.js
Normal file
28
server/libs/watcher/atomically/consts.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"use strict";
|
||||
/* CONSTS */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NOOP = exports.LIMIT_FILES_DESCRIPTORS = exports.LIMIT_BASENAME_LENGTH = exports.IS_USER_ROOT = exports.IS_POSIX = exports.DEFAULT_TIMEOUT_SYNC = exports.DEFAULT_TIMEOUT_ASYNC = exports.DEFAULT_WRITE_OPTIONS = exports.DEFAULT_READ_OPTIONS = exports.DEFAULT_FOLDER_MODE = exports.DEFAULT_FILE_MODE = exports.DEFAULT_ENCODING = void 0;
|
||||
const DEFAULT_ENCODING = 'utf8';
|
||||
exports.DEFAULT_ENCODING = DEFAULT_ENCODING;
|
||||
const DEFAULT_FILE_MODE = 0o666;
|
||||
exports.DEFAULT_FILE_MODE = DEFAULT_FILE_MODE;
|
||||
const DEFAULT_FOLDER_MODE = 0o777;
|
||||
exports.DEFAULT_FOLDER_MODE = DEFAULT_FOLDER_MODE;
|
||||
const DEFAULT_READ_OPTIONS = {};
|
||||
exports.DEFAULT_READ_OPTIONS = DEFAULT_READ_OPTIONS;
|
||||
const DEFAULT_WRITE_OPTIONS = {};
|
||||
exports.DEFAULT_WRITE_OPTIONS = DEFAULT_WRITE_OPTIONS;
|
||||
const DEFAULT_TIMEOUT_ASYNC = 5000;
|
||||
exports.DEFAULT_TIMEOUT_ASYNC = DEFAULT_TIMEOUT_ASYNC;
|
||||
const DEFAULT_TIMEOUT_SYNC = 100;
|
||||
exports.DEFAULT_TIMEOUT_SYNC = DEFAULT_TIMEOUT_SYNC;
|
||||
const IS_POSIX = !!process.getuid;
|
||||
exports.IS_POSIX = IS_POSIX;
|
||||
const IS_USER_ROOT = process.getuid ? !process.getuid() : false;
|
||||
exports.IS_USER_ROOT = IS_USER_ROOT;
|
||||
const LIMIT_BASENAME_LENGTH = 128; //TODO: fetch the real limit from the filesystem //TODO: fetch the whole-path length limit too
|
||||
exports.LIMIT_BASENAME_LENGTH = LIMIT_BASENAME_LENGTH;
|
||||
const LIMIT_FILES_DESCRIPTORS = 10000; //TODO: fetch the real limit from the filesystem
|
||||
exports.LIMIT_FILES_DESCRIPTORS = LIMIT_FILES_DESCRIPTORS;
|
||||
const NOOP = () => { };
|
||||
exports.NOOP = NOOP;
|
||||
Loading…
Add table
Add a link
Reference in a new issue