class Koine::Filesystem::Adapters::Base

rubocop:disable Lint/UnusedMethodArgument

Public Instance Methods

copy(from, to) click to toggle source

@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/filesystem/adapters/base.rb, line 107
def copy(from, to)
  raise NotImplementedError
end
create_dir(path) click to toggle source

@param path [String] path

@return [void]

# File lib/koine/filesystem/adapters/base.rb, line 132
def create_dir(path)
  raise NotImplementedError
end
delete(path) click to toggle source

@param path [String] path

@return [void]

@raise [FileNotFound] when file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 78
def delete(path)
  raise NotImplementedError
end
delete_dir(path) click to toggle source

@param path [String] path

@return [void]

# File lib/koine/filesystem/adapters/base.rb, line 139
def delete_dir(path)
  raise NotImplementedError
end
has?(path) click to toggle source

@param path [String] path

@return Boolean

# File lib/koine/filesystem/adapters/base.rb, line 69
def has?(path)
  raise NotImplementedError
end
list(path, recursive: false) click to toggle source

@param path [String] path @param recursive [Bool] path

@return [void]

# File lib/koine/filesystem/adapters/base.rb, line 147
def list(path, recursive: false)
  raise NotImplementedError
end
mime_type(path) click to toggle source

@param path [String] path

@return [String]

@raise [FileNotFound] when source file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 116
def mime_type(path)
  raise NotImplementedError
end
read(path) click to toggle source

@param path [String] path

@return string

@raise [FileNotFound] when file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 13
def read(path)
  raise NotImplementedError
end
read_and_delete(path) click to toggle source

@param path [String] path

@return [String]

@raise [FileNotFound] when file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 87
def read_and_delete(path)
  raise NotImplementedError
end
read_stream(path) click to toggle source

@param path [String] path

@return Boolean

@raise [FileNotFound] when file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 22
def read_stream(path)
  raise NotImplementedError
end
rename(from, to) click to toggle source

@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/filesystem/adapters/base.rb, line 97
def rename(from, to)
  raise NotImplementedError
end
size(path) click to toggle source

@param path [String] path

@return [Integer] Number of bytes

@raise [FileNotFound] when file does not exist or cannot be read

# File lib/koine/filesystem/adapters/base.rb, line 125
def size(path)
  raise NotImplementedError
end
update(path, contents, options: {}) click to toggle source

@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/filesystem/adapters/base.rb, line 51
def update(path, contents, options: {})
  raise NotImplementedError
end
update_stream(path, contents, options: {}) click to toggle source

@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/filesystem/adapters/base.rb, line 62
def update_stream(path, contents, options: {})
  raise NotImplementedError
end
write(path, contents, options: {}) click to toggle source

@param path [String] path @param contents [String] the content @param options [<Hash>] the options

@return [void]

# File lib/koine/filesystem/adapters/base.rb, line 31
def write(path, contents, options: {})
  raise NotImplementedError
end
write_stream(path, contents, options: {}) click to toggle source

@param path [String] path @param contents [String] the content @param options [<Hash>] the options

@return [void]

# File lib/koine/filesystem/adapters/base.rb, line 40
def write_stream(path, contents, options: {})
  raise NotImplementedError
end

Private Instance Methods

raise_not_found(file) click to toggle source
# File lib/koine/filesystem/adapters/base.rb, line 153
def raise_not_found(file)
  raise FileNotFound, "File not found: #{file}"
end