Skip to content

UPath created with specific filesystem does not use that filesystem #376

Closed
@alex-at-reliant

Description

@alex-at-reliant

I am setting up

fs = fsspec.filesystem(
  "filecache",
  target_protocol="gs", 
  cache_storage="/tmp/some/cache/folder/", 
)

to do

path = UPath("gs://bucket/some/path/to/some/file.json", fs=fs)

Then path.read_text() returns the right file content, but no file is cached in /tmp/some/cache/folder/. Moreover, path.fs returns the vanilla gcsfs.core.GCSFileSystem, not the expected WholeFileCacheFileSystem.

Am I using the API wrong? How does one force a filesystem to be used with upath?

Metadata

Metadata

Assignees

No one assigned

    Labels

    question ❓Further information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions