Skip to content

Latest commit

 

History

History
122 lines (82 loc) · 3.35 KB

File metadata and controls

122 lines (82 loc) · 3.35 KB

Import :

const RemoteFile = brackets.getModule("filesystem/RemoteFile")

RemoteFile

Kind: global class

new RemoteFile(fullPath, fileSystem)

Model for a RemoteFile.

This class should not be instantiated directly. Use FileSystem.getFileForPath

See the FileSystem class for more details.

Param Type Description
fullPath string The full path for this File.
fileSystem FileSystem The file system associated with this File.

remoteFile.toString()

Helpful toString for debugging and equality check purposes

Kind: instance method of RemoteFile

remoteFile.stat(callback)

Returns the stats for the remote entry.

Kind: instance method of RemoteFile

Param Type Description
callback function Callback with a FileSystemError string or FileSystemStats object.

remoteFile.read([options], callback)

Reads a remote file.

Kind: instance method of RemoteFile

Param Type Description
[options] Object Currently unused.
callback function Callback that is passed the FileSystemError string or the file's contents and its stats.

remoteFile.write(data, [options], [callback])

Write a file.

Kind: instance method of RemoteFile

Param Type Description
data string Data to write.
[options] object Currently unused.
[callback] function Callback that is passed the FileSystemError string or the file's new stats.

remoteFile.exists(callback)

Check if the remote file exists or not

Kind: instance method of RemoteFile

Param Type
callback function

remoteFile.unlink(callback)

Unlink the remote file

Kind: instance method of RemoteFile

Param Type
callback function

remoteFile.rename(callback)

Rename the remote file

Kind: instance method of RemoteFile

Param Type
callback function

remoteFile.moveToTrash(callback)

Move the remote file to trash

Kind: instance method of RemoteFile

Param Type
callback function