mirror of
https://github.com/zoriya/flood.git
synced 2026-06-02 11:06:35 +00:00
Migrate from mkdirp to fs.mkdir(recursive)
Signed-off-by: Jesse Chan <jc@linux.com>
This commit is contained in:
Generated
+2
-1
@@ -10542,7 +10542,8 @@
|
||||
"mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||
"dev": true
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.27.0",
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
"joi": "^13.7.0",
|
||||
"jsonwebtoken": "^8.4.0",
|
||||
"lodash": "^4.17.19",
|
||||
"mkdirp": "^1.0.4",
|
||||
"moment": "^2.27.0",
|
||||
"morgan": "^1.10.0",
|
||||
"multer": "^1.4.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* This file is deprecated in favor of clientGatewayService.
|
||||
*/
|
||||
const mkdirp = require('mkdirp');
|
||||
const fs = require('fs');
|
||||
const mv = require('mv');
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
@@ -70,7 +70,7 @@ class ClientRequest {
|
||||
// TODO: Move this to util, doesn't belong here
|
||||
createDirectory(options) {
|
||||
if (options.path) {
|
||||
mkdirp(options.path, (error) => {
|
||||
fs.mkdir(options.path, {recursive: true}, (error) => {
|
||||
if (error) {
|
||||
console.trace('Error creating directory.', error);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
const fs = require('fs');
|
||||
const mkdirp = require('mkdirp');
|
||||
const path = require('path');
|
||||
|
||||
class TemporaryStorage {
|
||||
constructor() {
|
||||
this.tempPath = path.join(path.dirname(require.main.filename), '..', 'temp');
|
||||
|
||||
mkdirp(this.tempPath);
|
||||
fs.mkdir(this.tempPath, {recursive: true});
|
||||
}
|
||||
|
||||
deleteFile(filename) {
|
||||
|
||||
Reference in New Issue
Block a user