* Check if a path represents a valid path for a directory * * @param {String} dirPath an absolute or a relative path * @return {Boolean}
(dirPath)
| 34 | * @return {Boolean} |
| 35 | */ |
| 36 | function 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 |
no outgoing calls
no test coverage detected