Skip to content

Commit

Permalink
Merge pull request #15 from ChevronETC/backend
Browse files Browse the repository at this point in the history
add backend method
  • Loading branch information
samtkaplan authored Feb 20, 2024
2 parents 6b6a627 + 03548e2 commit 743f07d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[compat]
julia = "^1.4"
AbstractStorage = "^1.1"
AbstractStorage = "^1.2"
2 changes: 2 additions & 0 deletions src/FolderStorage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ AbstractStorage.scrubsession(c::Folder) = c

AbstractStorage.minimaldict(c::Folder) = Dict("foldername"=>c.foldername)

AbstractStorage.backend(c::Folder) = "posix"

function Base.isfile(c::Folder, object::AbstractString)
# TODO: this feels like a kludge. the trouble is that the file can
# be written to jointpath(c,object) or a set of files, one for each
Expand Down
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,9 @@ end
rm(c)
rm(d)
rm(e)
end

@testset "backend" begin
c = Folder(joinpath(base, "foo"))
@test backend(c) == "posix"
end

0 comments on commit 743f07d

Please sign in to comment.