Skip to content

Commit 06d2ff5

Browse files
committed
enhance download_and_extract
1 parent 03e1e13 commit 06d2ff5

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

monai/apps/utils.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -298,35 +298,6 @@ def extractall(
298298
)
299299

300300

301-
def download_and_extract(
302-
url: str,
303-
filepath: PathLike = "",
304-
output_dir: PathLike = ".",
305-
hash_val: str | None = None,
306-
hash_type: str = "md5",
307-
file_type: str = "",
308-
has_base: bool = True,
309-
progress: bool = True,
310-
) -> None:
311-
"""
312-
Download file from URL and extract it to the output directory.
313-
314-
Args:
315-
url: source URL link to download file.
316-
filepath: the file path of the downloaded compressed file.
317-
use this option to keep the directly downloaded compressed file, to avoid further repeated downloads.
318-
output_dir: target directory to save extracted files.
319-
default is the current directory.
320-
hash_val: expected hash value to validate the downloaded file.
321-
if None, skip hash validation.
322-
hash_type: 'md5' or 'sha1', defaults to 'md5'.
323-
file_type: string of file type for decompressing. Leave it empty to infer the type from url's base file name.
324-
has_base: whether the extracted files have a base folder. This flag is used when checking if the existing
325-
folder is a result of `extractall`, if it is, the extraction is skipped. For example, if A.zip is unzipped
326-
to folder structure `A/*.png`, this flag should be True; if B.zip is unzipped to `*.png`, this flag should
327-
be False.
328-
progress: whether to display progress bar.
329-
"""
330301
def download_and_extract(
331302
url: str,
332303
filepath: PathLike = "",

0 commit comments

Comments
 (0)