2016-06-23 16:31:55 +00:00
|
|
|
"use strict";
|
|
|
|
require("typings-global");
|
2016-07-17 15:34:15 +00:00
|
|
|
const plugins = require("./smartfile.plugins");
|
|
|
|
const SmartfileInterpreter = require("./smartfile.interpreter");
|
2016-09-24 19:42:45 +00:00
|
|
|
const memory = require("./smartfile.memory");
|
2016-06-23 16:31:55 +00:00
|
|
|
/*===============================================================
|
2016-06-24 01:36:51 +00:00
|
|
|
============================ Checks =============================
|
|
|
|
===============================================================*/
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePath
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
exports.fileExistsSync = function (filePath) {
|
2016-07-17 15:34:15 +00:00
|
|
|
let fileExistsBool = false;
|
2016-06-24 01:36:51 +00:00
|
|
|
try {
|
2016-07-19 18:28:28 +00:00
|
|
|
plugins.fsExtra.readFileSync(filePath);
|
2016-06-24 01:36:51 +00:00
|
|
|
fileExistsBool = true;
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
fileExistsBool = false;
|
|
|
|
}
|
|
|
|
return fileExistsBool;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePath
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
exports.fileExists = function (filePath) {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2017-01-20 23:47:48 +00:00
|
|
|
plugins.fs.access(filePath, 4, function (err) {
|
2016-07-01 04:07:58 +00:00
|
|
|
err ? done.reject(err) : done.resolve();
|
2016-06-24 01:36:51 +00:00
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Checks if given path points to an existing directory
|
|
|
|
*/
|
|
|
|
exports.isDirectory = function (pathArg) {
|
2016-07-19 18:28:28 +00:00
|
|
|
return plugins.fsExtra.statSync(pathArg).isDirectory();
|
2016-06-24 01:36:51 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Checks if a given path points to an existing file
|
|
|
|
*/
|
|
|
|
exports.isFile = function (pathArg) {
|
2016-07-19 18:28:28 +00:00
|
|
|
return plugins.fsExtra.statSync(pathArg).isFile();
|
2016-06-24 01:36:51 +00:00
|
|
|
};
|
|
|
|
/*===============================================================
|
2016-06-23 16:31:55 +00:00
|
|
|
============================ FS ACTIONS =========================
|
|
|
|
===============================================================*/
|
2016-09-24 19:42:45 +00:00
|
|
|
/**
|
|
|
|
* copies a file from A to B on the local disk
|
|
|
|
*/
|
|
|
|
exports.copy = function (fromArg, toArg) {
|
|
|
|
let done = plugins.q.defer();
|
|
|
|
plugins.fsExtra.copy(fromArg, toArg, {}, function () {
|
|
|
|
done.resolve();
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
|
|
|
*/
|
|
|
|
exports.copySync = function (fromArg, toArg) {
|
|
|
|
plugins.fsExtra.copySync(fromArg, toArg);
|
|
|
|
return true;
|
|
|
|
};
|
2016-06-28 04:57:51 +00:00
|
|
|
/**
|
|
|
|
* ensures that a directory is in place
|
|
|
|
*/
|
2016-07-17 15:34:15 +00:00
|
|
|
exports.ensureDir = (dirPathArg) => {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-07-19 18:28:28 +00:00
|
|
|
plugins.fsExtra.ensureDir(dirPathArg, done.resolve);
|
2016-06-28 04:57:51 +00:00
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* ensures that a directory is in place
|
|
|
|
*/
|
2016-07-17 15:34:15 +00:00
|
|
|
exports.ensureDirSync = (dirPathArg) => {
|
2016-07-19 18:28:28 +00:00
|
|
|
plugins.fsExtra.ensureDirSync(dirPathArg);
|
2016-06-28 04:57:51 +00:00
|
|
|
};
|
2017-01-01 01:45:53 +00:00
|
|
|
/**
|
|
|
|
* ensure an empty directory
|
|
|
|
* @executes ASYNC
|
|
|
|
*/
|
|
|
|
exports.ensureEmptyDir = (dirPathArg) => {
|
|
|
|
let done = plugins.q.defer();
|
|
|
|
plugins.fsExtra.ensureDir(dirPathArg, () => {
|
|
|
|
plugins.fsExtra.emptyDir(dirPathArg, done.resolve);
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* ensure an empty directory
|
|
|
|
* @executes SYNC
|
|
|
|
*/
|
|
|
|
exports.ensureEmptyDirSync = (dirPathArg) => {
|
|
|
|
plugins.fsExtra.ensureDirSync(dirPathArg);
|
|
|
|
plugins.fsExtra.emptyDirSync(dirPathArg);
|
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
2016-09-24 19:42:45 +00:00
|
|
|
* ensures that a file is on disk
|
|
|
|
* @param filePath the filePath to ensureDir
|
|
|
|
* @param the fileContent to place into a new file in case it doesn't exist yet
|
|
|
|
* @returns Promise<void>
|
|
|
|
* @exec ASYNC
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-09-24 19:42:45 +00:00
|
|
|
exports.ensureFile = (filePathArg, initFileStringArg) => {
|
2016-09-20 15:56:49 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-09-24 19:42:45 +00:00
|
|
|
exports.ensureFileSync(filePathArg, initFileStringArg);
|
|
|
|
done.resolve();
|
2016-06-23 16:31:55 +00:00
|
|
|
return done.promise;
|
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
2016-09-24 19:42:45 +00:00
|
|
|
* ensures that a file is on disk
|
|
|
|
* @param filePath the filePath to ensureDir
|
|
|
|
* @param the fileContent to place into a new file in case it doesn't exist yet
|
|
|
|
* @returns Promise<void>
|
|
|
|
* @exec SYNC
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-09-24 19:42:45 +00:00
|
|
|
exports.ensureFileSync = (filePathArg, initFileStringArg) => {
|
|
|
|
if (exports.fileExistsSync(filePathArg)) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
memory.toFsSync(initFileStringArg, filePathArg);
|
|
|
|
}
|
2016-06-23 16:31:55 +00:00
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* removes a file or folder from local disk
|
|
|
|
*/
|
2016-06-23 16:31:55 +00:00
|
|
|
exports.remove = function (pathArg) {
|
2016-09-20 15:56:49 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-07-19 18:28:28 +00:00
|
|
|
plugins.fsExtra.remove(pathArg, function () {
|
2016-06-23 16:31:55 +00:00
|
|
|
done.resolve();
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* removes a file SYNCHRONOUSLY from local disk
|
|
|
|
*/
|
2016-06-23 16:31:55 +00:00
|
|
|
exports.removeSync = function (pathArg) {
|
2016-07-19 18:28:28 +00:00
|
|
|
plugins.fsExtra.removeSync(pathArg);
|
2016-06-23 16:31:55 +00:00
|
|
|
return true;
|
|
|
|
};
|
2016-09-29 12:17:46 +00:00
|
|
|
/**
|
|
|
|
* removes an array of filePaths from disk
|
|
|
|
*/
|
|
|
|
exports.removeMany = function (filePathArrayArg) {
|
|
|
|
let promiseArray = [];
|
|
|
|
for (let filePath of filePathArrayArg) {
|
|
|
|
promiseArray.push(exports.remove(filePath));
|
|
|
|
}
|
2017-01-20 23:47:48 +00:00
|
|
|
return Promise.all(promiseArray);
|
2016-09-29 12:17:46 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* like removeFilePathArray but SYNCHRONOUSLY
|
|
|
|
*/
|
|
|
|
exports.removeManySync = function (filePathArrayArg) {
|
|
|
|
for (let filePath of filePathArrayArg) {
|
|
|
|
exports.removeSync(filePath);
|
|
|
|
}
|
|
|
|
};
|
2016-06-23 16:31:55 +00:00
|
|
|
/*===============================================================
|
|
|
|
============================ Write/Read =========================
|
|
|
|
===============================================================*/
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePathArg
|
|
|
|
* @param fileTypeArg
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
exports.toObjectSync = function (filePathArg, fileTypeArg) {
|
2016-07-19 18:28:28 +00:00
|
|
|
let fileString = plugins.fsExtra.readFileSync(filePathArg, 'utf8');
|
2016-07-17 15:34:15 +00:00
|
|
|
let fileType;
|
2016-06-23 16:31:55 +00:00
|
|
|
fileTypeArg ? fileType = fileTypeArg : fileType = SmartfileInterpreter.filetype(filePathArg);
|
|
|
|
return SmartfileInterpreter.objectFile(fileString, fileType);
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* reads a file content to a String
|
|
|
|
* @param filePath
|
|
|
|
* @returns {string|Buffer|any}
|
|
|
|
*/
|
|
|
|
exports.toStringSync = function (filePath) {
|
2016-07-17 15:34:15 +00:00
|
|
|
let fileString;
|
2016-09-20 15:56:49 +00:00
|
|
|
fileString = plugins.fsExtra.readFileSync(filePath, 'utf8');
|
2016-06-23 16:31:55 +00:00
|
|
|
return fileString;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param filePathArg
|
|
|
|
* @param options
|
|
|
|
* @returns {number}
|
|
|
|
*/
|
2016-07-17 15:34:15 +00:00
|
|
|
exports.toVinylSync = function (filePathArg, options = {}) {
|
2016-06-23 16:31:55 +00:00
|
|
|
return plugins.vinylFile.readSync(filePathArg, options);
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* lets you reload files hot.
|
|
|
|
* @param path
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
exports.requireReload = function (path) {
|
|
|
|
return plugins.requireReload(path);
|
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* lists Folders in a directory on local disk
|
2016-06-28 04:57:51 +00:00
|
|
|
* @returns Promise
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-06-28 06:40:22 +00:00
|
|
|
exports.listFolders = function (pathArg, regexFilter) {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-07-19 18:28:28 +00:00
|
|
|
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
|
|
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory();
|
2016-06-23 16:31:55 +00:00
|
|
|
});
|
2016-06-28 06:40:22 +00:00
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
folderArray = folderArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
2016-06-23 16:31:55 +00:00
|
|
|
done.resolve(folderArray);
|
|
|
|
return done.promise;
|
|
|
|
};
|
2016-06-23 16:39:02 +00:00
|
|
|
/**
|
|
|
|
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
2016-06-28 04:57:51 +00:00
|
|
|
* @returns an array with the folder names as strings
|
2016-06-23 16:39:02 +00:00
|
|
|
*/
|
2016-06-28 06:40:22 +00:00
|
|
|
exports.listFoldersSync = function (pathArg, regexFilter) {
|
2016-07-19 18:28:28 +00:00
|
|
|
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
|
|
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory();
|
2016-06-23 16:39:02 +00:00
|
|
|
});
|
2016-06-28 06:40:22 +00:00
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
folderArray = folderArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
return folderArray;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* lists Files in a directory on local disk
|
|
|
|
* @returns Promise
|
|
|
|
*/
|
|
|
|
exports.listFiles = function (pathArg, regexFilter) {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-07-19 18:28:28 +00:00
|
|
|
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
|
|
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
fileArray = fileArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
done.resolve(fileArray);
|
2016-06-28 07:59:59 +00:00
|
|
|
return done.promise;
|
2016-06-28 06:40:22 +00:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* lists Files SYNCHRONOUSLY in a directory on local disk
|
|
|
|
* @returns an array with the folder names as strings
|
|
|
|
*/
|
|
|
|
exports.listFilesSync = function (pathArg, regexFilter) {
|
2016-07-19 18:28:28 +00:00
|
|
|
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
|
|
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
fileArray = fileArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
return fileArray;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* lists all items (folders AND files) in a directory on local disk
|
2016-09-17 21:11:44 +00:00
|
|
|
* @returns Promise<string[]>
|
2016-06-28 06:40:22 +00:00
|
|
|
*/
|
|
|
|
exports.listAllItems = function (pathArg, regexFilter) {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-07-19 18:28:28 +00:00
|
|
|
let allItmesArray = plugins.fsExtra.readdirSync(pathArg);
|
2016-06-28 06:40:22 +00:00
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
allItmesArray = allItmesArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
;
|
|
|
|
done.resolve(allItmesArray);
|
2016-06-28 07:59:59 +00:00
|
|
|
return done.promise;
|
2016-06-28 06:40:22 +00:00
|
|
|
};
|
|
|
|
/**
|
2016-09-17 21:11:44 +00:00
|
|
|
* lists all items (folders AND files) in a directory on local disk
|
2016-06-28 06:40:22 +00:00
|
|
|
* @returns an array with the folder names as strings
|
2016-09-17 21:11:44 +00:00
|
|
|
* @executes SYNC
|
2016-06-28 06:40:22 +00:00
|
|
|
*/
|
|
|
|
exports.listAllItemsSync = function (pathArg, regexFilter) {
|
2016-07-19 18:28:28 +00:00
|
|
|
let allItmesArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
|
|
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
if (regexFilter) {
|
2016-07-17 15:34:15 +00:00
|
|
|
allItmesArray = allItmesArray.filter((fileItem) => {
|
2016-06-28 07:59:59 +00:00
|
|
|
return regexFilter.test(fileItem);
|
2016-06-28 06:40:22 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
return allItmesArray;
|
2016-06-23 16:39:02 +00:00
|
|
|
};
|
2016-09-17 21:11:44 +00:00
|
|
|
/**
|
|
|
|
* lists a file tree using a miniMatch filter
|
2016-09-30 14:16:11 +00:00
|
|
|
* note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted
|
2016-09-17 21:11:44 +00:00
|
|
|
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
|
|
|
*/
|
2016-09-30 14:16:11 +00:00
|
|
|
exports.listFileTree = (dirPathArg, miniMatchFilter) => {
|
2016-09-17 21:11:44 +00:00
|
|
|
let done = plugins.q.defer();
|
2016-09-30 14:16:11 +00:00
|
|
|
// handle absolute miniMatchFilter
|
|
|
|
let dirPath;
|
|
|
|
if (plugins.path.isAbsolute(miniMatchFilter)) {
|
|
|
|
dirPath = '/';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
dirPath = dirPathArg;
|
|
|
|
}
|
2016-07-17 15:34:15 +00:00
|
|
|
let options = {
|
2016-06-30 23:37:48 +00:00
|
|
|
cwd: dirPath
|
|
|
|
};
|
2016-07-17 15:34:15 +00:00
|
|
|
plugins.glob(miniMatchFilter, options, (err, files) => {
|
2016-06-30 23:37:48 +00:00
|
|
|
if (err) {
|
|
|
|
console.log(err);
|
2016-07-01 04:07:58 +00:00
|
|
|
done.reject(err);
|
2016-06-30 23:37:48 +00:00
|
|
|
}
|
|
|
|
done.resolve(files);
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
2017-01-20 23:47:48 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmZzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmZzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFFdkIsK0NBQStDO0FBQy9DLGdFQUFnRTtBQUNoRSw2Q0FBNEM7QUFDNUM7O2lFQUVpRTtBQUVqRTs7OztHQUlHO0FBQ1EsUUFBQSxjQUFjLEdBQUcsVUFBUyxRQUFRO0lBQ3pDLElBQUksY0FBYyxHQUFZLEtBQUssQ0FBQTtJQUNuQyxJQUFJLENBQUM7UUFDRCxPQUFPLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxRQUFRLENBQUMsQ0FBQTtRQUN0QyxjQUFjLEdBQUcsSUFBSSxDQUFBO0lBQ3pCLENBQUM7SUFBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0F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