Skip to main content
The Google Docs resource exposes Docs documents as a virtual filesystem mounted at some prefix such as /gdocs/. For Google OAuth setup, see Google Workspace Setup.

Config

Filesystem Layout

Example:
Documents are split into owned (documents you created) and shared (documents shared with you). The filename shape is:
If the modified date is unavailable, the date prefix is omitted. Reading a document file returns the full Google Docs API JSON for that document.

Shared Drives

The listing covers every corpus the account can reach, so a document that lives in a Shared Drive appears here too. A Shared Drive document has no owner (the drive owns it), so it lands under shared, which is what that directory means. This matches the gdrive mount, where Shared Drives are top-level directories: without it the same account would see a document under one Google mount and not the other, with no error explaining the difference. Drive answers an all-corpora search best-effort. When it reports that it skipped a corpus, the short listing is still returned but is not cached as the directory, so the next ls re-lists instead of serving the gap until the cache expires.

Cache

The Google Docs resource uses IndexCacheStore. Index entries store document IDs and metadata. There is no separate content cache — file content caching is handled by the workspace IOResult mechanism.

Example

See examples/gdocs/gdocs.py for the full working example.

Shell Commands

Standard commands available on the mounted Google Docs tree: Acting on documents (appending text, raw API calls) goes through the gws CLI when installed.