mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
Fix documentation examples for fsUtils.isDirectory
This commit is contained in:
parent
18dc048302
commit
f75d06b302
@ -25,8 +25,15 @@ exports.isValidPath = (p) ->
|
||||
# @param {Function} callback callback(error, isDirectory)
|
||||
#
|
||||
# @example Is directory?
|
||||
# console.log isDirectory('/usr/local/share') # True
|
||||
# console.log isDirectory('/Users/me/app.js') # False
|
||||
# isDirectory '/usr/local/share', (error, isDirectory) ->
|
||||
# throw error if error?
|
||||
# console.log(isDirectory)
|
||||
# # True
|
||||
#
|
||||
# isDirectory '/Users/me/app.js', (error, isDirectory) ->
|
||||
# throw error if error?
|
||||
# console.log(isDirectory)
|
||||
# # False
|
||||
#
|
||||
exports.isDirectory = (directory, callback) ->
|
||||
fs.stat directory, (error, stats) ->
|
||||
|
Loading…
Reference in New Issue
Block a user