Sha256: 57431a362036d488ac6f4afccd3c6a1b8c6ec39a40508be82ba1a8c6c295d7b7
Contents?: true
Size: 344 Bytes
Versions: 2
Compression:
Stored size: 344 Bytes
Contents
module Tori module Backend class FileSystem def initialize(root) @root = root FileUtils.mkdir_p(@root.to_s) end def copy(uploader, filename) IO.copy_stream(uploader, @root.join(filename)) end def delete(filename) File.unlink @root.join(filename) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tori-0.0.2 | lib/tori/backend/filesystem.rb |
tori-0.0.1 | lib/tori/backend/filesystem.rb |