MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / isWritable

Function isWritable

Extension/src/SSH/TargetsView/targetNodes.ts:20–28  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

18// Cleared in SSH targets provider during refresh
19export const filesWritable: Map<string, boolean> = new Map<string, boolean>();
20async function isWritable(file: string): Promise<boolean> {
21 let cachedWritable: boolean | undefined = filesWritable.get(file);
22 if (cachedWritable === undefined) {
23 const writable: boolean = await pathAccessible(file, constants.W_OK);
24 filesWritable.set(file, writable);
25 cachedWritable = writable;
26 }
27 return cachedWritable;
28}
29
30export class TargetLeafNode extends LabelLeafNode {
31 constructor(readonly name: string, readonly sshConfigHostInfo: ISshConfigHostInfo) {

Callers 1

getTreeItemMethod · 0.85

Calls 3

pathAccessibleFunction · 0.90
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected