BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-cache/src/stores
Run
Logout
Edit File
Size: 1.56 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-cache/src/stores/AutoCleanFileStore.js
Text
Base64
"use strict"; const FileStore = require("./FileStore"); const fs = require("fs"); const path = require("path"); const walkSync = function (dir, filelist) { const files = fs.readdirSync(dir); filelist = filelist || []; files.forEach(function (file) { const fullPath = path.join(dir, file); const stats = fs.statSync(fullPath); if (stats.isDirectory()) { filelist = walkSync(fullPath + path.sep, filelist); } else { filelist.push({ path: fullPath, stats, }); } }); return filelist; }; function get(property, defaultValue) { if (property == null) { return defaultValue; } return property; } class AutoCleanFileStore extends FileStore { constructor(opts) { super({ root: opts.root, }); this._intervalMs = get(opts.intervalMs, 10 * 60 * 1000); this._cleanupThresholdMs = get( opts.cleanupThresholdMs, 3 * 24 * 60 * 60 * 1000 ); this._scheduleCleanup(); } _scheduleCleanup() { setTimeout(this._doCleanup.bind(this), this._intervalMs); } _doCleanup() { const files = walkSync(this._root, []); let warned = false; files.forEach((file) => { if (file.stats.mtimeMs < Date.now() - this._cleanupThresholdMs) { try { fs.unlinkSync(file.path); } catch (e) { if (!warned) { console.warn( "Problem cleaning up cache for " + file.path + ": " + e.message ); warned = true; } } } }); this._scheduleCleanup(); } } module.exports = AutoCleanFileStore;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 16
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AutoCleanFileStore.d.ts
340 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AutoCleanFileStore.js
1.56 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AutoCleanFileStore.js.flow
2.35 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FileStore.d.ts
448 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FileStore.js
1.60 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FileStore.js.flow
1.96 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpError.js
154 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpError.js.flow
411 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpGetStore.d.ts
448 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpGetStore.js
991 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpGetStore.js.flow
1.43 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpStore.d.ts
709 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpStore.js
8.23 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HttpStore.js.flow
10.77 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NetworkError.js
160 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NetworkError.js.flow
417 B
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).