fix(core): update

This commit is contained in:
Philipp Kunz 2023-08-23 10:58:38 +02:00
parent 7b3194cc13
commit b84c504f11
2 changed files with 13 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartfile',
version: '10.0.29',
version: '10.0.30',
description: 'offers smart ways to work with files in nodejs'
}

View File

@ -40,7 +40,18 @@ export const fileExists = async (filePath): Promise<boolean> => {
/**
* Checks if given path points to an existing directory
*/
export const isDirectory = (pathArg): boolean => {
export const isDirectory = (pathArg: string): boolean => {
try {
return plugins.fsExtra.statSync(pathArg).isDirectory();
} catch (err) {
return false;
}
};
/**
* Checks if given path points to an existing directory
*/
export const isDirectorySync = (pathArg: string): boolean => {
try {
return plugins.fsExtra.statSync(pathArg).isDirectory();
} catch (err) {