Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
}
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);
}
}