fix(core): update
This commit is contained in:
parent
7b3194cc13
commit
b84c504f11
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartfile',
|
name: '@push.rocks/smartfile',
|
||||||
version: '10.0.29',
|
version: '10.0.30',
|
||||||
description: 'offers smart ways to work with files in nodejs'
|
description: 'offers smart ways to work with files in nodejs'
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,18 @@ export const fileExists = async (filePath): Promise<boolean> => {
|
|||||||
/**
|
/**
|
||||||
* Checks if given path points to an existing directory
|
* 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 {
|
try {
|
||||||
return plugins.fsExtra.statSync(pathArg).isDirectory();
|
return plugins.fsExtra.statSync(pathArg).isDirectory();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user