|
| 1 | +### Import : |
| 2 | +```js |
| 3 | +const RemoteFile = brackets.getModule("filesystem/RemoteFile") |
| 4 | +``` |
| 5 | + |
| 6 | +<a name="RemoteFile"></a> |
| 7 | + |
| 8 | +## RemoteFile |
| 9 | +**Kind**: global class |
| 10 | + |
| 11 | +* [RemoteFile](#RemoteFile) |
| 12 | + * [new RemoteFile(fullPath, fileSystem)](#new_RemoteFile_new) |
| 13 | + * [.toString()](#RemoteFile+toString) |
| 14 | + * [.stat(callback)](#RemoteFile+stat) |
| 15 | + * [.read([options], callback)](#RemoteFile+read) |
| 16 | + * [.write(data, [options], [callback])](#RemoteFile+write) |
| 17 | + * [.exists(callback)](#RemoteFile+exists) |
| 18 | + * [.unlink(callback)](#RemoteFile+unlink) |
| 19 | + * [.rename(callback)](#RemoteFile+rename) |
| 20 | + * [.moveToTrash(callback)](#RemoteFile+moveToTrash) |
| 21 | + |
| 22 | +<a name="new_RemoteFile_new"></a> |
| 23 | + |
| 24 | +### new RemoteFile(fullPath, fileSystem) |
| 25 | +Model for a RemoteFile. |
| 26 | + |
| 27 | +This class should *not* be instantiated directly. Use FileSystem.getFileForPath |
| 28 | + |
| 29 | +See the FileSystem class for more details. |
| 30 | + |
| 31 | + |
| 32 | +| Param | Type | Description | |
| 33 | +| --- | --- | --- | |
| 34 | +| fullPath | <code>string</code> | The full path for this File. | |
| 35 | +| fileSystem | <code>FileSystem</code> | The file system associated with this File. | |
| 36 | + |
| 37 | +<a name="RemoteFile+toString"></a> |
| 38 | + |
| 39 | +### remoteFile.toString() |
| 40 | +Helpful toString for debugging and equality check purposes |
| 41 | + |
| 42 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 43 | +<a name="RemoteFile+stat"></a> |
| 44 | + |
| 45 | +### remoteFile.stat(callback) |
| 46 | +Returns the stats for the remote entry. |
| 47 | + |
| 48 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 49 | + |
| 50 | +| Param | Type | Description | |
| 51 | +| --- | --- | --- | |
| 52 | +| callback | <code>function</code> | Callback with a FileSystemError string or FileSystemStats object. | |
| 53 | + |
| 54 | +<a name="RemoteFile+read"></a> |
| 55 | + |
| 56 | +### remoteFile.read([options], callback) |
| 57 | +Reads a remote file. |
| 58 | + |
| 59 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 60 | + |
| 61 | +| Param | Type | Description | |
| 62 | +| --- | --- | --- | |
| 63 | +| [options] | <code>Object</code> | Currently unused. | |
| 64 | +| callback | <code>function</code> | Callback that is passed the FileSystemError string or the file's contents and its stats. | |
| 65 | + |
| 66 | +<a name="RemoteFile+write"></a> |
| 67 | + |
| 68 | +### remoteFile.write(data, [options], [callback]) |
| 69 | +Write a file. |
| 70 | + |
| 71 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 72 | + |
| 73 | +| Param | Type | Description | |
| 74 | +| --- | --- | --- | |
| 75 | +| data | <code>string</code> | Data to write. | |
| 76 | +| [options] | <code>object</code> | Currently unused. | |
| 77 | +| [callback] | <code>function</code> | Callback that is passed the FileSystemError string or the file's new stats. | |
| 78 | + |
| 79 | +<a name="RemoteFile+exists"></a> |
| 80 | + |
| 81 | +### remoteFile.exists(callback) |
| 82 | +Check if the remote file exists or not |
| 83 | + |
| 84 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 85 | + |
| 86 | +| Param | Type | |
| 87 | +| --- | --- | |
| 88 | +| callback | <code>function</code> | |
| 89 | + |
| 90 | +<a name="RemoteFile+unlink"></a> |
| 91 | + |
| 92 | +### remoteFile.unlink(callback) |
| 93 | +Unlink the remote file |
| 94 | + |
| 95 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 96 | + |
| 97 | +| Param | Type | |
| 98 | +| --- | --- | |
| 99 | +| callback | <code>function</code> | |
| 100 | + |
| 101 | +<a name="RemoteFile+rename"></a> |
| 102 | + |
| 103 | +### remoteFile.rename(callback) |
| 104 | +Rename the remote file |
| 105 | + |
| 106 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 107 | + |
| 108 | +| Param | Type | |
| 109 | +| --- | --- | |
| 110 | +| callback | <code>function</code> | |
| 111 | + |
| 112 | +<a name="RemoteFile+moveToTrash"></a> |
| 113 | + |
| 114 | +### remoteFile.moveToTrash(callback) |
| 115 | +Move the remote file to trash |
| 116 | + |
| 117 | +**Kind**: instance method of [<code>RemoteFile</code>](#RemoteFile) |
| 118 | + |
| 119 | +| Param | Type | |
| 120 | +| --- | --- | |
| 121 | +| callback | <code>function</code> | |
| 122 | + |
0 commit comments