mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Add fs.split
This commit is contained in:
@@ -77,6 +77,15 @@ module.exports =
|
||||
read: (path) ->
|
||||
$native.read(path)
|
||||
|
||||
# Returns an array of path components. If the path is absolute, the first
|
||||
# component will be an indicator of the root of the file system; for file
|
||||
# systems with drives (such as Windows), this is the drive identifier with a
|
||||
# colon, like "c:"; on Unix, this is an empty string "". The intent is that
|
||||
# calling "join.apply" with the result of "split" as arguments will
|
||||
# reconstruct the path.
|
||||
split: (path) ->
|
||||
path.split("/")
|
||||
|
||||
# Open, write, flush, and close a file, writing the given content.
|
||||
write: (path, content) ->
|
||||
$native.write(path, content)
|
||||
|
||||
Reference in New Issue
Block a user