os-js / osjs-server

OS.js Server Module

Home Page:https://manual.os-js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support higher order (async) functions in VFS adapters

andersevenrud opened this issue · comments

Right now the higher order functions look like this:

const adapter = (core) => {
  return {
    readdir: vfs => async (path, options) => {},
    // ...
  }
}

It would be nice to have the following option:

const adapter = (core) => {
  return async (vfs) => { // async optional
    readdir: async (path, options) => {},
    // ...
  }
}

As well as:

This is supported as of 2020-07-22

const adapter = async (core) => {
 // ...
}