class SocialSnippet::StorageBackend::FileSystemStorage
Public Class Methods
activate!()
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 61 def self.activate! ::SocialSnippet.class_eval do remove_const :Storage const_set :Storage, ::SocialSnippet::StorageBackend::FileSystemStorage end end
Public Instance Methods
cd(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 29 def cd(path) ::FileUtils.cd path end
cp_r(src, dest)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 17 def cp_r(src, dest) ::FileUtils.cp_r src, dest end
directory?(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 49 def directory?(path) ::File.directory? path end
exists?(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 41 def exists?(path) ::File.exists? path end
file?(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 45 def file?(path) ::File.file? path end
glob(glob_path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 37 def glob(glob_path) ::Dir.glob glob_path end
mkdir(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 53 def mkdir(path) ::FileUtils.mkdir path end
mkdir_p(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 57 def mkdir_p(path) ::FileUtils.mkdir_p path end
pwd()
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 33 def pwd ::Dir.pwd end
read(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 5 def read(path) ::File.read path end
rm(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 21 def rm(path) ::FileUtils.rm path end
rm_r(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 25 def rm_r(path) ::FileUtils.rm_r path end
touch(path)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 13 def touch(path) ::FileUtils.touch path end
write(path, data)
click to toggle source
# File lib/social_snippet/storage_backend/file_system_storage.rb, line 9 def write(path, data) ::File.write path, data end