Use path.basename() instead of fsUtils.base()

This commit is contained in:
Kevin Sawicki
2013-06-12 15:26:09 -07:00
parent 437137783c
commit eede4a386f
17 changed files with 74 additions and 75 deletions

View File

@@ -22,13 +22,6 @@ module.exports =
catch e
path
# Return the basename of the given path. That is the path with
# any leading directory components removed. If specified, also
# remove a trailing extension.
base: (path, ext) ->
base = path.replace(/\/$/, '').split("/").pop()
if ext then base.replace(RegExp("#{_.escapeRegExp(ext)}$"), '') else base
# 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.