Skip to main content

RemoteFile

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.

ParamTypeDescription
fullPathstringThe full path for this File.
fileSystemFileSystemThe 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

ParamTypeDescription
callbackfunctionCallback with a FileSystemError string or FileSystemStats object.

remoteFile.read([options], callback)

Reads a remote file.

Kind: instance method of RemoteFile

ParamTypeDescription
[options]ObjectCurrently unused.
callbackfunctionCallback 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

ParamTypeDescription
datastringData to write.
[options]objectCurrently unused.
[callback]functionCallback 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

ParamType
callbackfunction

remoteFile.unlink(callback)

Unlink the remote file

Kind: instance method of RemoteFile

ParamType
callbackfunction

remoteFile.rename(callback)

Rename the remote file

Kind: instance method of RemoteFile

ParamType
callbackfunction

remoteFile.moveToTrash(callback)

Move the remote file to trash

Kind: instance method of RemoteFile

ParamType
callbackfunction