Skip to content

baseFS

Abstract FileSystem base: lifecycle, rooted POSIX paths, encoding, and portable fallbacks so a concrete backend only implements low-level I/O.

A new adapter typically overrides:

  • onInit / onClose (optional)
  • createRootDirectory when BaseFileSystemOptions.createRoot is set
  • toBackendPath when the backend needs non-POSIX separators
  • preparePath for post-resolve checks (e.g. symlink containment)
  • the *At primitives and isNotFoundError
  • optional try* hooks for native append / copy / move