mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
* feat: update filegraph on touch command * feat: update filegraph on mkdir * feat: add different parsing opts for each command * refactor: replace axios with fetch. put handleCommand to a new file * feat: add config for mounting cli in dev stage * refactor: clean up unused validators * feat: add command handler for copy files. reuse resolvePath function * feat: add rm handler, support specific files deletion. Glob not supported yet * feat: handle discover cases that the folder is actually empty * feat: handle discover empty folder better and support rmdir * feat: handle mv command * refactor: remove unused console logs
11 lines
187 B
JavaScript
11 lines
187 B
JavaScript
const os = require('os')
|
|
const path = require('path')
|
|
|
|
function resolvePath(p) {
|
|
return path.resolve(process.cwd(), p.replace('~', os.homedir()))
|
|
}
|
|
|
|
module.exports = {
|
|
resolvePath,
|
|
}
|