MCPcopy Index your code
hub / github.com/devcontainers/cli / isFile

Function isFile

src/spec-common/commonUtils.ts:556–571  ·  view source on GitHub ↗
(shellServer: ShellServer, location: string)

Source from the content-addressed store, hash-verified

554}
555
556export async function isFile(shellServer: ShellServer, location: string) {
557 return platformDispatch(shellServer.platform, {
558 posix: async () => {
559 try {
560 await shellServer.exec(`test -f '${location}'`);
561 return true;
562 } catch (err) {
563 return false;
564 }
565 },
566 win32: async () => {
567 return (await shellServer.exec(`Test-Path '${location}' -PathType Leaf`))
568 .stdout.trim() === 'True';
569 }
570 })();
571}
572
573let localUsername: Promise<string>;
574export async function getLocalUsername() {

Callers 3

patchEtcEnvironmentFunction · 0.90
patchEtcProfileFunction · 0.90
readUserEnvFromCacheFunction · 0.90

Calls 2

platformDispatchFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected