smartfile/dist/smartfile.fs.js
2016-09-30 16:38:24 +02:00

323 lines
20 KiB
JavaScript

"use strict";
require("typings-global");
const plugins = require("./smartfile.plugins");
const SmartfileInterpreter = require("./smartfile.interpreter");
const memory = require("./smartfile.memory");
/*===============================================================
============================ Checks =============================
===============================================================*/
/**
*
* @param filePath
* @returns {boolean}
*/
exports.fileExistsSync = function (filePath) {
let fileExistsBool = false;
try {
plugins.fsExtra.readFileSync(filePath);
fileExistsBool = true;
}
catch (err) {
fileExistsBool = false;
}
return fileExistsBool;
};
/**
*
* @param filePath
* @returns {any}
*/
exports.fileExists = function (filePath) {
let done = plugins.q.defer();
plugins.fs.access(filePath, plugins.fs.R_OK, function (err) {
err ? done.reject(err) : done.resolve();
});
return done.promise;
};
/**
* Checks if given path points to an existing directory
*/
exports.isDirectory = function (pathArg) {
return plugins.fsExtra.statSync(pathArg).isDirectory();
};
/**
* Checks if a given path points to an existing file
*/
exports.isFile = function (pathArg) {
return plugins.fsExtra.statSync(pathArg).isFile();
};
/*===============================================================
============================ FS ACTIONS =========================
===============================================================*/
/**
* 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;
};
/**
* ensures that a directory is in place
*/
exports.ensureDir = (dirPathArg) => {
let done = plugins.q.defer();
plugins.fsExtra.ensureDir(dirPathArg, done.resolve);
return done.promise;
};
/**
* ensures that a directory is in place
*/
exports.ensureDirSync = (dirPathArg) => {
plugins.fsExtra.ensureDirSync(dirPathArg);
};
/**
* 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
*/
exports.ensureFile = (filePathArg, initFileStringArg) => {
let done = plugins.q.defer();
exports.ensureFileSync(filePathArg, initFileStringArg);
done.resolve();
return done.promise;
};
/**
* 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
*/
exports.ensureFileSync = (filePathArg, initFileStringArg) => {
if (exports.fileExistsSync(filePathArg)) {
return null;
}
else {
memory.toFsSync(initFileStringArg, filePathArg);
}
};
/**
* removes a file or folder from local disk
*/
exports.remove = function (pathArg) {
let done = plugins.q.defer();
plugins.fsExtra.remove(pathArg, function () {
done.resolve();
});
return done.promise;
};
/**
* removes a file SYNCHRONOUSLY from local disk
*/
exports.removeSync = function (pathArg) {
plugins.fsExtra.removeSync(pathArg);
return true;
};
/**
* removes an array of filePaths from disk
*/
exports.removeMany = function (filePathArrayArg) {
let promiseArray = [];
for (let filePath of filePathArrayArg) {
promiseArray.push(exports.remove(filePath));
}
return plugins.q.all(promiseArray);
};
/**
* like removeFilePathArray but SYNCHRONOUSLY
*/
exports.removeManySync = function (filePathArrayArg) {
for (let filePath of filePathArrayArg) {
exports.removeSync(filePath);
}
};
/*===============================================================
============================ Write/Read =========================
===============================================================*/
/**
*
* @param filePathArg
* @returns {*}
*/
exports.toGulpStreamSync = function (filePathArg) {
let stream = plugins.gulp.src(filePathArg);
return stream;
};
exports.toGulpDestSync = function (folderPathArg) {
return plugins.gulp.dest(folderPathArg);
};
/**
*
* @param filePathArg
* @param fileTypeArg
* @returns {any}
*/
exports.toObjectSync = function (filePathArg, fileTypeArg) {
let fileString = plugins.fsExtra.readFileSync(filePathArg, 'utf8');
let fileType;
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) {
let fileString;
fileString = plugins.fsExtra.readFileSync(filePath, 'utf8');
return fileString;
};
/**
*
* @param filePathArg
* @param options
* @returns {number}
*/
exports.toVinylSync = function (filePathArg, options = {}) {
return plugins.vinylFile.readSync(filePathArg, options);
};
/**
* lets you reload files hot.
* @param path
* @returns {any}
*/
exports.requireReload = function (path) {
return plugins.requireReload(path);
};
/**
* lists Folders in a directory on local disk
* @returns Promise
*/
exports.listFolders = function (pathArg, regexFilter) {
let done = plugins.q.defer();
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory();
});
if (regexFilter) {
folderArray = folderArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
done.resolve(folderArray);
return done.promise;
};
/**
* lists Folders SYNCHRONOUSLY in a directory on local disk
* @returns an array with the folder names as strings
*/
exports.listFoldersSync = function (pathArg, regexFilter) {
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory();
});
if (regexFilter) {
folderArray = folderArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
return folderArray;
};
/**
* lists Files in a directory on local disk
* @returns Promise
*/
exports.listFiles = function (pathArg, regexFilter) {
let done = plugins.q.defer();
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
});
if (regexFilter) {
fileArray = fileArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
done.resolve(fileArray);
return done.promise;
};
/**
* lists Files SYNCHRONOUSLY in a directory on local disk
* @returns an array with the folder names as strings
*/
exports.listFilesSync = function (pathArg, regexFilter) {
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
});
if (regexFilter) {
fileArray = fileArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
return fileArray;
};
/**
* lists all items (folders AND files) in a directory on local disk
* @returns Promise<string[]>
*/
exports.listAllItems = function (pathArg, regexFilter) {
let done = plugins.q.defer();
let allItmesArray = plugins.fsExtra.readdirSync(pathArg);
if (regexFilter) {
allItmesArray = allItmesArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
;
done.resolve(allItmesArray);
return done.promise;
};
/**
* lists all items (folders AND files) in a directory on local disk
* @returns an array with the folder names as strings
* @executes SYNC
*/
exports.listAllItemsSync = function (pathArg, regexFilter) {
let allItmesArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile();
});
if (regexFilter) {
allItmesArray = allItmesArray.filter((fileItem) => {
return regexFilter.test(fileItem);
});
}
return allItmesArray;
};
/**
* lists a file tree using a miniMatch filter
* note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted
* @returns Promise<string[]> string array with the absolute paths of all matching files
*/
exports.listFileTree = (dirPathArg, miniMatchFilter) => {
let done = plugins.q.defer();
// handle absolute miniMatchFilter
let dirPath;
if (plugins.path.isAbsolute(miniMatchFilter)) {
dirPath = '/';
}
else {
dirPath = dirPathArg;
}
let options = {
cwd: dirPath
};
plugins.glob(miniMatchFilter, options, (err, files) => {
if (err) {
console.log(err);
done.reject(err);
}
done.resolve(files);
});
return done.promise;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmZzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmZzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFFdkIsK0NBQStDO0FBQy9DLGdFQUFnRTtBQUNoRSw2Q0FBNEM7QUFDNUM7O2lFQUVpRTtBQUVqRTs7OztHQUlHO0FBQ1EsUUFBQSxjQUFjLEdBQUcsVUFBUyxRQUFRO0lBQ3pDLElBQUksY0FBYyxHQUFZLEtBQUssQ0FBQTtJQUNuQyxJQUFJLENBQUM7UUFDRCxPQUFPLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxRQU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