REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.60 KB
Close
/home/byroehnu/.trash/node_modules11/formidable/lib/file.js
Text
Base64
if (global.GENTLY) require = GENTLY.hijack(require); var util = require('util'), fs = require('fs'), EventEmitter = require('events').EventEmitter, crypto = require('crypto'); function File(properties) { EventEmitter.call(this); this.size = 0; this.path = null; this.name = null; this.type = null; this.hash = null; this.lastModifiedDate = null; this._writeStream = null; for (var key in properties) { this[key] = properties[key]; } if(typeof this.hash === 'string') { this.hash = crypto.createHash(properties.hash); } else { this.hash = null; } } module.exports = File; util.inherits(File, EventEmitter); File.prototype.open = function() { this._writeStream = new fs.WriteStream(this.path); }; File.prototype.toJSON = function() { var json = { size: this.size, path: this.path, name: this.name, type: this.type, mtime: this.lastModifiedDate, length: this.length, filename: this.filename, mime: this.mime }; if (this.hash && this.hash != "") { json.hash = this.hash; } return json; }; File.prototype.write = function(buffer, cb) { var self = this; if (self.hash) { self.hash.update(buffer); } if (this._writeStream.closed) { return cb(); } this._writeStream.write(buffer, function() { self.lastModifiedDate = new Date(); self.size += buffer.length; self.emit('progress', self.size); cb(); }); }; File.prototype.end = function(cb) { var self = this; if (self.hash) { self.hash = self.hash.digest('hex'); } this._writeStream.end(function() { self.emit('end'); cb(); }); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
file.js
1.60 KB
lrw-r--r--
2026-02-28 11:54:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
incoming_form.js
13.54 KB
lrw-r--r--
2026-02-28 11:54:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
133 B
lrw-r--r--
2026-02-28 11:54:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
json_parser.js
650 B
lrw-r--r--
2026-02-28 11:54:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
multipart_parser.js
8.26 KB
lrw-r--r--
2026-02-28 11:54:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
octet_parser.js
456 B
lrw-r--r--
2026-02-28 11:54:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
querystring_parser.js
740 B
lrw-r--r--
2026-02-28 11:54:50
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).