Rename path variables to filePath

This commit is contained in:
Kevin Sawicki
2014-02-10 14:18:42 -08:00
parent 1645efa2ce
commit 1436b8eb5e

View File

@@ -165,14 +165,14 @@ class TextBuffer extends TextBufferCore
# Sets the path for the file.
#
# path - A {String} representing the new file path
setPath: (path) ->
return if path == @getPath()
# filePath - A {String} representing the new file path
setPath: (filePath) ->
return if filePath == @getPath()
@file?.off()
if path
@file = new File(path)
if filePath
@file = new File(filePath)
@subscribeToFile()
else
@file = null
@@ -188,12 +188,12 @@ class TextBuffer extends TextBufferCore
# Saves the buffer at a specific path.
#
# path - The path to save at.
saveAs: (path) ->
unless path then throw new Error("Can't save buffer with no file path")
# filePath - The path to save at.
saveAs: (filePath) ->
unless filePath then throw new Error("Can't save buffer with no file path")
@emit 'will-be-saved', this
@setPath(path)
@setPath(filePath)
@cachedDiskContents = @getText()
@file.write(@getText())
@conflict = false