refactor: move fs/pfs to db-worker.js

This commit is contained in:
Tienson Qin
2025-09-07 12:51:02 +08:00
parent 24e9896fb7
commit 1a9b5b843c
6 changed files with 16 additions and 32 deletions

View File

@@ -27,15 +27,6 @@ if (detect() === 'Worker') {
portal.set('workerThread', {
rimraf: async function (path) {
// try {
// // First assume path is itself a file
// await pfs.unlink(path)
// // if that worked we're done
// return
// } catch (err) {
// // Otherwise, path must be a directory
// if (err.code !== 'EISDIR') throw err
// }
// Knowing path is a directory,
// first, assume everything inside path is a file.
let files = await pfs.readdir(path);