tfds.download.Resource
Represents a resource to download, extract, or both.
tfds.download.Resource(
*,
url: Optional[str] = None,
extract_method: Optional[tfds.download.ExtractMethod
] = None,
path: Optional[epath.PathLike] = None
)
Args |
url
|
str , the URL at which to download the resource.
|
extract_method
|
ExtractMethod to be used to extract resource. If not
set, will be guessed from downloaded file name original_fname .
|
path
|
str , path of resource on local disk. Can be None if resource has
not be downloaded yet. In such case, url must be set.
|
Attributes |
extract_method
|
Returns ExtractMethod to use on resource. Cannot be None.
|
Methods
exists_locally
View source
@classmethod
exists_locally(
path: tfds.typing.PathLike
)
Returns whether the resource exists locally, at resource.path
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[]]