Skip to content

Commit

Permalink
files - make exists as fast as possible with our current file system …
Browse files Browse the repository at this point in the history
…provider API
  • Loading branch information
bpasero committed Aug 5, 2019
1 parent 5535ee4 commit 122615e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/platform/files/common/fileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,12 @@ export class FileService extends Disposable implements IFileService {
}

async exists(resource: URI): Promise<boolean> {
const provider = await this.withProvider(resource);

try {
return !!(await this.resolve(resource));
const stat = await provider.stat(resource);

return !!stat;
} catch (error) {
return false;
}
Expand Down

0 comments on commit 122615e

Please sign in to comment.