MCPcopy Index your code
hub / github.com/angular/angular-cli / createWorkspaceHost

Function createWorkspaceHost

packages/angular/cli/src/utilities/config.ts:21–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21function createWorkspaceHost(): workspaces.WorkspaceHost {
22 return {
23 readFile(path) {
24 return fs.readFile(path, 'utf-8');
25 },
26 async writeFile(path, data) {
27 await fs.writeFile(path, data);
28 },
29 async isDirectory(path) {
30 try {
31 const stats = await fs.stat(path);
32
33 return stats.isDirectory();
34 } catch {
35 return false;
36 }
37 },
38 async isFile(path) {
39 try {
40 const stats = await fs.stat(path);
41
42 return stats.isFile();
43 } catch {
44 return false;
45 }
46 },
47 };
48}
49
50export const workspaceSchemaPath = path.join(__dirname, '../../lib/config/schema.json');
51

Callers 2

saveMethod · 0.70
loadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected