-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69bd78f
commit 1728baf
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import fsspec | ||
from fsspec.implementations.local import LocalFileSystem | ||
|
||
|
||
class FuseFileSystem(fsspec.LocalFileSystem): | ||
class FuseFileSystem(LocalFileSystem): | ||
""" | ||
`datasets.filesystems.FuseFileSystem` is a subclass of [`fsspec.LocalFileSystem`](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.implementations.local.LocalFileSystem). | ||
`datasets.filesystems.FuseFileSystem` is a subclass of `fsspec`'s [`LocalFileSystem`](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.implementations.local.LocalFileSystem). | ||
Users can use this class to access FUSE-mounted files. The `datasets` library treats this class as a remote file | ||
system to make file moving and renaming more efficient. | ||
""" | ||
|
||
|
||
def create_fuse_file_system(fs: fsspec.LocalFileSystem): | ||
"""Creates a FuseFileSystem by copying over attributes from an fsspec.LocalFileSystem.""" | ||
def create_fuse_file_system(fs: LocalFileSystem): | ||
"""Creates a FuseFileSystem by copying over attributes from an `LocalFileSystem`.""" | ||
fuse_fs = FuseFileSystem() | ||
fuse_fs.__dict__.update(fs.__dict__) |