You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/package_reference/hf_file_system.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,4 @@ The `HfFileSystem` class provides a pythonic file interface to the Hugging Face
10
10
11
11
`HfFileSystem` is based on [fsspec](https://filesystem-spec.readthedocs.io/en/latest/), so it is compatible with most of the APIs that it offers. For more details, check out [our guide](../guides/hf_file_system) and fsspec's [API Reference](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem).
Endpoint of the Hub. Defaults to <https://huggingface.co>.
133
+
block_size (`int`, *optional*):
134
+
Block size for reading and writing files.
135
+
expand_info (`bool`, *optional*):
136
+
Whether to expand the information of the files.
137
+
**storage_options (`dict`, *optional*):
138
+
Additional options for the filesystem. See [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.__init__).
139
+
133
140
Usage:
134
141
135
142
```python
@@ -164,13 +171,15 @@ def __init__(
164
171
endpoint: Optional[str] =None,
165
172
token: Union[bool, str, None] =None,
166
173
block_size: Optional[int] =None,
174
+
expand_info: Optional[bool] =None,
167
175
**storage_options,
168
176
):
169
177
super().__init__(*args, **storage_options)
170
178
self.endpoint=endpointorconstants.ENDPOINT
171
179
self.token=token
172
180
self._api=HfApi(endpoint=endpoint, token=token)
173
181
self.block_size=block_size
182
+
self.expand_info=expand_info
174
183
# Maps (repo_type, repo_id, revision) to a 2-tuple with:
175
184
# * the 1st element indicating whether the repositoy and the revision exist
176
185
# * the 2nd element being the exception raised if the repository or revision doesn't exist
0 commit comments