MCPcopy
hub / github.com/faressoft/terminalizer / isDir

Function isDir

utility.js:36–51  ·  view source on GitHub ↗

* Check if a path represents a valid path for a directory * * @param {String} dirPath an absolute or a relative path * @return {Boolean}

(dirPath)

Source from the content-addressed store, hash-verified

34 * @return {Boolean}
35 */
36function isDir(dirPath) {
37
38 // Resolve the path into an absolute path
39 dirPath = di.path.resolve(dirPath);
40
41 try {
42
43 return di.fs.statSync(dirPath).isDirectory();
44
45 } catch (error) {
46
47 return false;
48
49 }
50
51}
52
53/**
54 * Load a file's content

Callers 1

isGlobalDirectoryCreatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected