/
bucket.jl
39 lines (30 loc) · 1.1 KB
/
bucket.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module Bucket
using ...SimpleTasks.Types
export download, upload
"""
download(bucket::BucketService, remote_file::AbstractString,
local_file::Union{AbstractString, IO})
Download a remote file either to a new location `AbstractString` or a stream `IO`.
If the local_file is not specified, a stream to the download is returned
"""
function download(bucket::BucketService, remote_file::AbstractString,
local_file::Union{AbstractString, IO, Void}=nothing)
error("download with $bucket is not implemented")
end
"""
upload(bucket::BucketService, local_file::Union{AbstractString, IO},
remote_file::AbstractString)
Upload a file `AbstractString` or a stream `IO` to the bucket service.
"""
function upload(bucket::BucketService, local_file::Union{AbstractString, IO},
remote_file::AbstractString)
error("upload with $bucket is not implemented")
end
"""
delete(bucket::BucketService, remote_file::AbstractString)
Delete the remote file from bucket
"""
function delete(bucket::BucketService, remote_file::AbstractString)
error("delete with $bucket is not implemented")
end
end # module Bucket