How yuziouo/cf-fs works
cf-fs is a Cloudflare Workers file-storage service: browser and WebDAV requests use a shared filesystem, with file bodies stored in R2 and coordination and metadata in Durable Objects. The principal flow is request entry, protocol handling, path-bound resource operations, filesystem mutations or reads, and storage. The graph preserves the documented WebDAV RFC extensions as distinct capabilities. Some filesystem and protocol details were not excerpted, so their relationships are included only where supported by the README or SOURCE INDEX; unsampled implementation links are omitted.
Main entry points: webdav/index.ts WebDAV entry · routes.ts Core DAV routes · fs.ts Filesystem API · src/index.ts Worker entry
Components 20
Request Access
- Worker entry
src/index.ts - Browser interface
src/browser/index.ts
WebDAV Protocol
- WebDAV entry
src/webdav/index.ts - Core DAV routes
src/webdav/rfc4918/routes.ts - DAV resources
src/webdav/core/resource.ts - Properties and locks
src/webdav/rfc4918/properties.ts - DAV state
src/webdav/core/state.ts - DAV XML
src/webdav/core/xml.ts - Quota extension
src/webdav/rfc4331/quota.ts - Sync routes
src/webdav/rfc6578/routes.ts - Collection sync
src/webdav/rfc6578/sync.ts - Extended MKCOL
src/webdav/rfc5689/routes.ts
Filesystem
- Path handling
src/path.ts - Filesystem API
src/filesystem/fs.ts - File operations
src/filesystem/vfs
Storage
- Filesystem metadata
src/filesystem/meta/state.ts - Object-store interface
src/interfaces/object_store.ts - R2 object store
src/filesystem/object/r2.ts
Other components
- Browser users
- WebDAV clients
Connections 25
- Browser users → Worker entry: send requests
README.md - WebDAV clients → Worker entry: send requests
README.md - Worker entry → Browser interface: routes browser
src/index.ts - Worker entry → WebDAV entry: routes WebDAV
src/index.ts - Browser interface → Filesystem API: uses filesystem
src/browser/index.ts - WebDAV entry → Core DAV routes: registers routes
src/webdav/index.ts - WebDAV entry → Quota extension: configures quota
src/webdav/index.ts - WebDAV entry → Collection sync: configures sync
src/webdav/index.ts - WebDAV entry → Sync routes: registers routes
src/webdav/index.ts - WebDAV entry → Extended MKCOL: registers routes
src/webdav/index.ts - Core DAV routes → DAV resources: operates on
src/webdav/rfc4918/routes.ts - Core DAV routes → Properties and locks: uses properties
src/webdav/rfc4918/routes.ts - Core DAV routes → Quota extension: requests quota data
src/webdav/rfc4918/routes.ts - Core DAV routes → Collection sync: requests sync data
src/webdav/rfc4918/routes.ts - Core DAV routes → DAV XML: validates and parses
src/webdav/rfc4918/routes.ts - DAV resources → Filesystem API: reads and mutates
src/webdav/core/resource.ts - DAV resources → DAV state: stores DAV state
src/webdav/core/resource.ts - Properties and locks → DAV state: reads and writes
src/webdav/rfc4918/properties.ts - Properties and locks → DAV XML: serializes properties
src/webdav/rfc4918/properties.ts - Filesystem API → File operations: delegates operations
src/filesystem/fs.ts - Filesystem API → Filesystem metadata: uses metadata state
src/filesystem/fs.ts - Filesystem API → Object-store interface: uses storage interface
README.md - Object-store interface → R2 object store: implemented by
- Sync routes → Collection sync: uses sync logic
src/webdav/rfc6578/routes.ts - Extended MKCOL → DAV XML: parses XML
src/webdav/rfc5689/routes.ts