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

Function validPath

bin/lib/options.mjs:357–370  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

355]
356
357function validPath (value) {
358 if (value === 'default') {
359 return Promise.resolve(true)
360 }
361 if (!value) {
362 return Promise.resolve('You must enter a valid path')
363 }
364 return new Promise((resolve) => {
365 fs.stat(value, function (err) {
366 if (err) return resolve('Nothing found at this path')
367 return resolve(true)
368 })
369 })
370}
371
372function validUri (value) {
373 if (!validUrl.isUri(value)) {

Callers

nothing calls this directly

Calls 1

statMethod · 0.80

Tested by

no test coverage detected