How to use the @theia/filesystem/lib/common.FileAccess.Constants function in @theia/filesystem

To help you get started, we’ve selected a few @theia/filesystem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / preferences / src / browser / preference-editor-widget.ts View on Github external
private async canAccessSettings(folderUriStr: string): Promise {
        const settingsUri = this.foldersPreferenceProvider.getConfigUri(folderUriStr);
        if (settingsUri) {
            return this.fileSystem.access(settingsUri.toString(), FileAccess.Constants.R_OK);
        }
        return this.fileSystem.access(folderUriStr, FileAccess.Constants.W_OK);
    }
}
github eclipse-theia / theia / packages / preferences / src / browser / preference-editor-widget.ts View on Github external
private async canAccessSettings(folderUriStr: string): Promise {
        const settingsUri = this.foldersPreferenceProvider.getConfigUri(folderUriStr);
        if (settingsUri) {
            return this.fileSystem.access(settingsUri.toString(), FileAccess.Constants.R_OK);
        }
        return this.fileSystem.access(folderUriStr, FileAccess.Constants.W_OK);
    }
}