mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Rename path variables to filePath
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user