REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.98 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers/file.js
Text
Base64
"use strict"; const fs = require("fs"); const { ono } = require("@jsdevtools/ono"); const url = require("../util/url"); const { ResolverError } = require("../util/errors"); module.exports = { /** * The order that this resolver will run, in relation to other resolvers. * * @type {number} */ order: 100, /** * Determines whether this resolver can read a given file reference. * Resolvers that return true will be tried, in order, until one successfully resolves the file. * Resolvers that return false will not be given a chance to resolve the file. * * @param {object} file - An object containing information about the referenced file * @param {string} file.url - The full URL of the referenced file * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) * @returns {boolean} */ canRead (file) { return url.isFileSystemPath(file.url); }, /** * Reads the given file and returns its raw contents as a Buffer. * * @param {object} file - An object containing information about the referenced file * @param {string} file.url - The full URL of the referenced file * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) * @returns {Promise<Buffer>} */ read (file) { return new Promise(((resolve, reject) => { let path; try { path = url.toFileSystemPath(file.url); } catch (err) { reject(new ResolverError(ono.uri(err, `Malformed URI: ${file.url}`), file.url)); } // console.log('Opening file: %s', path); try { fs.readFile(path, (err, data) => { if (err) { reject(new ResolverError(ono(err, `Error opening file "${path}"`), path)); } else { resolve(data); } }); } catch (err) { reject(new ResolverError(ono(err, `Error opening file "${path}"`), path)); } })); } };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
file.js
1.98 KB
lrw-r--r--
2026-02-23 15:45:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
http.js
5.06 KB
lrw-r--r--
2026-02-23 15:45:44
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).