* Get the names of the files in a directory
(path: string, cb: BFSCallback<string[]>)
| 639 | * Get the names of the files in a directory |
| 640 | */ |
| 641 | public readdir(path: string, cb: BFSCallback<string[]>): void { |
| 642 | this._client.readdir(path, (error, files) => { |
| 643 | if (error) { |
| 644 | return cb(this.convert(error)); |
| 645 | } else { |
| 646 | return cb(null, files); |
| 647 | } |
| 648 | }); |
| 649 | } |
| 650 | |
| 651 | /** |
| 652 | * Converts a Dropbox-JS error into a BFS error. |