Use path.dirname() instead of fsUtils.directory()

This commit is contained in:
Kevin Sawicki
2013-06-12 15:54:34 -07:00
parent d1cf839e53
commit 7cf4063d9e
10 changed files with 27 additions and 46 deletions

View File

@@ -23,14 +23,6 @@ module.exports =
catch e
path
# Returns the path of a file's containing directory, albeit the
# parent directory if the file is a directory. A terminal directory
# separator is ignored.
directory: (path) ->
parentPath = path.replace(new RegExp("/#{Path.basename(_.escapeRegExp(path))}\/?$"), '')
return "" if path == parentPath
parentPath
# Returns true if the file specified by path exists
exists: (path) ->
path? and fs.existsSync(path)