Skip to content

Commit

Permalink
fix(doc): walk expects absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Feb 12, 2024
1 parent ad0d411 commit 273dfc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/fsspec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Using json keyfile path:
from pydrive2.fs import GDriveFileSystem
fs = GDriveFileSystem(
# replace with ID of a drive or directory and give service account access to it
"root",
use_service_account=True,
client_json_file_path="/path/to/keyfile.json",
Expand All @@ -88,6 +89,7 @@ Using json keyfile string:
from pydrive2.fs import GDriveFileSystem
fs = GDriveFileSystem(
# replace with ID of a drive or directory and give service account access to it
"root",
use_service_account=True,
client_json=json_string,
Expand All @@ -106,7 +108,8 @@ Using filesystem

.. code-block:: python
for root, dnames, fnames in fs.walk(""):
# replace `root` with ID of a drive or directory and give service account access to it
for root, dnames, fnames in fs.walk("root"):
for dname in dnames:
print(f"dir: {root}/{dname}")
Expand Down

0 comments on commit 273dfc2

Please sign in to comment.