File Explorer

/proc/4/root/var/lang/lib/node_modules/npm/node_modules/@npmcli/name-from-folder/lib

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

index.js225 B · 8 lines
const { basename, dirname } = require('path') const getName = (parent, base) =>  parent.charAt(0) === '@' ? `${parent}/${base}` : base module.exports = dir => dir ? getName(basename(dirname(dir)), basename(dir))  : false