class Koine::FileSystem::Adapters::Base
rubocop:disable Lint/UnusedMethodArgument
Public Instance Methods
@param from [String] path @param to [String] path
@return [void]
@raise [FileNotFound] when source file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 107 def copy(from, to) raise NotImplementedError end
@param path [String] path
@return [void]
# File lib/koine/file_system/adapters/base.rb, line 132 def create_dir(path) raise NotImplementedError end
@param path [String] path
@return [void]
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 78 def delete(path) raise NotImplementedError end
@param path [String] path
@return [void]
# File lib/koine/file_system/adapters/base.rb, line 139 def delete_dir(path) raise NotImplementedError end
@param path [String] path
@return Boolean
# File lib/koine/file_system/adapters/base.rb, line 69 def has?(path) raise NotImplementedError end
@param path [String] path @param recursive [Bool] path
@return [void]
# File lib/koine/file_system/adapters/base.rb, line 147 def list(path, recursive: false) raise NotImplementedError end
@param path [String] path
@return [String]
@raise [FileNotFound] when source file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 116 def mime_type(path) raise NotImplementedError end
@param path [String] path
@return string
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 13 def read(path) raise NotImplementedError end
@param path [String] path
@return [String]
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 87 def read_and_delete(path) raise NotImplementedError end
@param path [String] path
@return Boolean
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 22 def read_stream(path) raise NotImplementedError end
@param from [String] path @param to [String] path
@return [void]
@raise [FileNotFound] when source file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 97 def rename(from, to) raise NotImplementedError end
@param path [String] path
@return [Integer] Number of bytes
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 125 def size(path) raise NotImplementedError end
@param path [String] path @param contents [String] the new content @param options [<Hash>] the options
@return [void]
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 51 def update(path, contents, options: {}) raise NotImplementedError end
@param path [String] path @param contents [String] the new content @param options [<Hash>] the options
@return [void]
@raise [FileNotFound] when file does not exist or cannot be read
# File lib/koine/file_system/adapters/base.rb, line 62 def update_stream(path, contents, options: {}) raise NotImplementedError end
@param path [String] path @param contents [String] the content @param options [<Hash>] the options
@return [void]
# File lib/koine/file_system/adapters/base.rb, line 31 def write(path, contents, options: {}) raise NotImplementedError end
@param path [String] path @param contents [String] the content @param options [<Hash>] the options
@return [void]
# File lib/koine/file_system/adapters/base.rb, line 40 def write_stream(path, contents, options: {}) raise NotImplementedError end
Private Instance Methods
# File lib/koine/file_system/adapters/base.rb, line 153 def raise_not_found(file) raise FileNotFound, "File not found: #{file}" end