summaryrefslogtreecommitdiff
path: root/node_modules/fs-extra/lib/util
diff options
context:
space:
mode:
authorLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 23:08:57 +0300
committerLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 23:08:57 +0300
commit726b81b19251674e149ccfbb1abacbd837fc6db0 (patch)
treefbdbb227dc01357eb76e8222d76185bc124c5ca6 /node_modules/fs-extra/lib/util
parent34f0890e175698940d49238097579f44e4d78c89 (diff)
downloadFlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.gz
FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.zst
Removed files that should not have been included in git
Diffstat (limited to 'node_modules/fs-extra/lib/util')
-rw-r--r--node_modules/fs-extra/lib/util/assign.js16
-rw-r--r--node_modules/fs-extra/lib/util/buffer.js11
-rw-r--r--node_modules/fs-extra/lib/util/utimes.js72
3 files changed, 0 insertions, 99 deletions
diff --git a/node_modules/fs-extra/lib/util/assign.js b/node_modules/fs-extra/lib/util/assign.js
deleted file mode 100644
index 317e5ec..0000000
--- a/node_modules/fs-extra/lib/util/assign.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict'
-
-// simple mutable assign
-function assign () {
- const args = [].slice.call(arguments).filter(i => i)
- const dest = args.shift()
- args.forEach(src => {
- Object.keys(src).forEach(key => {
- dest[key] = src[key]
- })
- })
-
- return dest
-}
-
-module.exports = assign
diff --git a/node_modules/fs-extra/lib/util/buffer.js b/node_modules/fs-extra/lib/util/buffer.js
deleted file mode 100644
index 93af51b..0000000
--- a/node_modules/fs-extra/lib/util/buffer.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* eslint-disable node/no-deprecated-api */
-module.exports = function (size) {
- if (typeof Buffer.allocUnsafe === 'function') {
- try {
- return Buffer.allocUnsafe(size)
- } catch (e) {
- return new Buffer(size)
- }
- }
- return new Buffer(size)
-}
diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js
deleted file mode 100644
index 4c32099..0000000
--- a/node_modules/fs-extra/lib/util/utimes.js
+++ /dev/null
@@ -1,72 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const os = require('os')
-const path = require('path')
-
-// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
-function hasMillisResSync () {
- let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
- tmpfile = path.join(os.tmpdir(), tmpfile)
-
- // 550 millis past UNIX epoch
- const d = new Date(1435410243862)
- fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
- const fd = fs.openSync(tmpfile, 'r+')
- fs.futimesSync(fd, d, d)
- fs.closeSync(fd)
- return fs.statSync(tmpfile).mtime > 1435410243000
-}
-
-function hasMillisRes (callback) {
- let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
- tmpfile = path.join(os.tmpdir(), tmpfile)
-
- // 550 millis past UNIX epoch
- const d = new Date(1435410243862)
- fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
- if (err) return callback(err)
- fs.open(tmpfile, 'r+', (err, fd) => {
- if (err) return callback(err)
- fs.futimes(fd, d, d, err => {
- if (err) return callback(err)
- fs.close(fd, err => {
- if (err) return callback(err)
- fs.stat(tmpfile, (err, stats) => {
- if (err) return callback(err)
- callback(null, stats.mtime > 1435410243000)
- })
- })
- })
- })
- })
-}
-
-function timeRemoveMillis (timestamp) {
- if (typeof timestamp === 'number') {
- return Math.floor(timestamp / 1000) * 1000
- } else if (timestamp instanceof Date) {
- return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
- } else {
- throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
- }
-}
-
-function utimesMillis (path, atime, mtime, callback) {
- // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
- fs.open(path, 'r+', (err, fd) => {
- if (err) return callback(err)
- fs.futimes(fd, atime, mtime, futimesErr => {
- fs.close(fd, closeErr => {
- if (callback) callback(futimesErr || closeErr)
- })
- })
- })
-}
-
-module.exports = {
- hasMillisRes,
- hasMillisResSync,
- timeRemoveMillis,
- utimesMillis
-}