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

Function moveDirectory

tests/e2e/utils/fs.ts:42–55  ·  view source on GitHub ↗
(from: string, to: string)

Source from the content-addressed store, hash-verified

40}
41
42export async function moveDirectory(from: string, to: string): Promise<void> {
43 await rimraf(to);
44 await createDir(to);
45
46 for (const entry of await fs.readdir(from)) {
47 const fromEntry = join(from, entry);
48 const toEntry = join(to, entry);
49 if ((await fs.stat(fromEntry)).isFile()) {
50 await copyFile(fromEntry, toEntry);
51 } else {
52 await moveDirectory(fromEntry, toEntry);
53 }
54 }
55}
56
57export function writeMultipleFiles(fs: { [path: string]: string }) {
58 return Promise.all(Object.keys(fs).map((fileName) => writeFile(fileName, fs[fileName])));

Callers

nothing calls this directly

Calls 6

rimrafFunction · 0.85
createDirFunction · 0.85
joinFunction · 0.85
copyFileFunction · 0.85
isFileMethod · 0.65
statMethod · 0.65

Tested by

no test coverage detected