File Downloader Result¶
DownloadResult
¶
Representation of file download result.
Container for file paths, divided into certain categories:
Added in 0.3.0
Examples:
>>> from onetl.file import FileDownloader
>>> downloader = FileDownloader(local_path="/local", ...)
>>> download_result = downloader.run(
... [
... "/remote/file1",
... "/remote/file2",
... "/failed/file",
... "/existing/file",
... "/missing/file",
... ]
... )
>>> download_result
DownloadResult(
successful=FileSet([
LocalPath("/local/file1"),
LocalPath("/local/file2"),
]),
failed=FileSet([
FailedLocalFile("/failed/file")
]),
skipped=FileSet([
RemoteFile("/existing/file")
]),
missing=FileSet([
RemotePath("/missing/file")
]),
)
Parameters:
-
(successful¶FileSet[LocalPath], default:FileSet()) –File paths (local) which were downloaded successfully
-
(failed¶FileSet[FailedRemoteFile], default:FileSet()) –File paths (remote) which were not downloaded because of some failure
-
(skipped¶FileSet[RemoteFile], default:FileSet()) –File paths (remote) which were skipped because of some reason
-
(missing¶FileSet[PurePosixPath], default:FileSet()) –File paths (remote) which are not present in the remote file system