This pull request introduces the following methods:
WorkTree.prototype.exists(path). This works exactly as its Node counterpart and returns a boolean indicating whether or not a file currently exists at the specified path. (cc5ec38)
Buffer.prototype.dispose(). This method is currently just used to un-register the callbacks supplied to onChange. In the future, we could actually dispose the buffer and release memory from the WASM layer. (495fe82)
Buffer.prototype.getPath(). If the underlying file that corresponds to the buffer is visible, this method will return a string representing its path. Otherwise, null will be returned, and that's an indicator that the file has been deleted. (34a2fca)
This pull request introduces the following methods:
WorkTree.prototype.exists(path)
. This works exactly as its Node counterpart and returns a boolean indicating whether or not a file currently exists at the specifiedpath
. (cc5ec38)Buffer.prototype.dispose()
. This method is currently just used to un-register the callbacks supplied toonChange
. In the future, we could actually dispose the buffer and release memory from the WASM layer. (495fe82)Buffer.prototype.getPath()
. If the underlying file that corresponds to the buffer is visible, this method will return a string representing its path. Otherwise,null
will be returned, and that's an indicator that the file has been deleted. (34a2fca)/cc: @probablycorey @nathansobo