src/io.js
// this method uses a file system link to associate an existing src folder/file with a new dest folder/file.
this method uses a file system link to associate an existing src folder/file with a new dest folder/file.
this method uses a file system link to associate an existing src folder / file with a new dest folder / file .
async function symLink(src, dest) {
  if (debug_level) log.info(`symLink: ${src} ${dest}`);
  if (!(src && dest)) {  
    log.error('Error (symLink): Invalid request.')
    return false;
  }
  let existingPath = path.resolve(src)
  let newPath = path.resolve(dest);
  log.info(`*** symlink: "${existingPath}" as "${newPath}`)
  return await fsPromises.symlink(existingPath, newPath, 'junction');
}
async function symLink ( src , dest ) { if ( debug_level ) log . info ( ` ${ src } ${ dest } ` ) ; if ( ! ( src && dest ) ) { log . error ( 'Error (symLink): Invalid request.' ) return false ; } let existingPath = path . resolve ( src ) let newPath = path . resolve ( dest ) ; log . info ( ` ${ existingPath } ${ newPath } ` ) return await fsPromises . symlink ( existingPath , newPath , 'junction' ) ; }
this method uses a file system link to associate an existing src folder/file with a new dest folder/file.
this method uses a file system link to associate an existing src folder / file with a new dest folder / file .
// check if user trying to go outside their own subfolder