MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / cleanDir

Function cleanDir

test/utils/index.mjs:20–29  ·  view source on GitHub ↗
(dirPath)

Source from the content-addressed store, hash-verified

18}
19
20export function cleanDir (dirPath) {
21 fs.removeSync(path.normalize(path.join(dirPath, '.well-known/.acl')))
22 fs.removeSync(path.normalize(path.join(dirPath, '.acl')))
23 fs.removeSync(path.normalize(path.join(dirPath, 'favicon.ico')))
24 fs.removeSync(path.normalize(path.join(dirPath, 'favicon.ico.acl')))
25 fs.removeSync(path.normalize(path.join(dirPath, 'index.html')))
26 fs.removeSync(path.normalize(path.join(dirPath, 'index.html.acl')))
27 fs.removeSync(path.normalize(path.join(dirPath, 'robots.txt')))
28 fs.removeSync(path.normalize(path.join(dirPath, 'robots.txt.acl')))
29}
30
31export function write (text, file) {
32 return fs.writeFileSync(path.normalize(path.join(__dirname, '../resources/' + file)), text)

Calls

no outgoing calls

Tested by

no test coverage detected