protocol.cljs 828 B

1234567891011121314151617181920212223
  1. (ns frontend.fs.protocol
  2. ;; namespace local config to suppress 'new-path' of 'rename!'. clj-kondo's bug?
  3. {:clj-kondo/config {:linters {:private-call {:level :off}}}})
  4. (defprotocol Fs
  5. (mkdir! [this dir])
  6. (mkdir-recur! [this dir])
  7. (readdir [this dir])
  8. (unlink! [this repo path opts])
  9. (rmdir! [this dir])
  10. (read-file [this dir path opts])
  11. (write-file! [this repo dir path content opts])
  12. (rename! [this repo old-path new-path])
  13. (copy! [this repo old-path new-path])
  14. (stat [this dir path])
  15. (open-dir [this ok-handler])
  16. (get-files [this path-or-handle ok-handler])
  17. (watch-dir! [this dir options])
  18. (unwatch-dir! [this dir])
  19. ;; Ensure the dir is watched, window agnostic.
  20. ;; Implementation should handle the actual watcher's construction / destruction.
  21. ;; So shouldn't consider `unwatch-dir!`.
  22. )