MCPcopy Create free account
hub / github.com/VemtoOrg/vemto2 / copyFolderIfNotExists

Method copyFolderIfNotExists

src/main/base/FileSystem.ts:123–131  ·  view source on GitHub ↗

* Makes a folder based on a folder template (copy the folder)

(templateFolder: string, destinationFolder: string, createDestinationIfNotExists = true)

Source from the content-addressed store, hash-verified

121 * Makes a folder based on a folder template (copy the folder)
122 */
123 copyFolderIfNotExists(templateFolder: string, destinationFolder: string, createDestinationIfNotExists = true): void {
124 if(this.folderDoesNotExist(destinationFolder)) {
125 if(createDestinationIfNotExists) {
126 this.makeFolderFromPathIfNotExists(destinationFolder)
127 }
128
129 this.copyFolder(templateFolder, destinationFolder)
130 }
131 }
132
133
134 copyFolder(templateFolder: string, destinationFolder: string): boolean {

Callers 2

HandleIpcMessagesFunction · 0.80
publishAllMethod · 0.80

Calls 3

folderDoesNotExistMethod · 0.95
copyFolderMethod · 0.95

Tested by

no test coverage detected