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
@@ -160,13 +167,15 @@ def __init__(
160
167
endpoint: Optional[str] =None,
161
168
token: Union[bool, str, None] =None,
162
169
block_size: Optional[int] =None,
170
+
expand_info: Optional[bool] =None,
163
171
**storage_options,
164
172
):
165
173
super().__init__(*args, **storage_options)
166
174
self.endpoint=endpointorconstants.ENDPOINT
167
175
self.token=token
168
176
self._api=HfApi(endpoint=endpoint, token=token)
169
177
self.block_size=block_size
178
+
self.expand_info=expand_info
170
179
# Maps (repo_type, repo_id, revision) to a 2-tuple with:
171
180
# * the 1st element indicating whether the repositoy and the revision exist
172
181
# * the 2nd element being the exception raised if the repository or revision doesn't exist
0 commit comments