Class: Koine::Filesystem::Adapters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/koine/filesystem/adapters/base.rb

Overview

rubocop:disable Lint/UnusedMethodArgument

Direct Known Subclasses

Local

Instance Method Summary collapse

Instance Method Details

#copy(from, to) ⇒ void

This method returns an undefined value.

Parameters:

  • from (String)

    path

  • to (String)

    path

Raises:

  • (FileNotFound)

    when source file does not exist or cannot be read



107
108
109
# File 'lib/koine/filesystem/adapters/base.rb', line 107

def copy(from, to)
  raise NotImplementedError
end

#create_dir(path) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

Raises:

  • (NotImplementedError)


132
133
134
# File 'lib/koine/filesystem/adapters/base.rb', line 132

def create_dir(path)
  raise NotImplementedError
end

#delete(path) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



78
79
80
# File 'lib/koine/filesystem/adapters/base.rb', line 78

def delete(path)
  raise NotImplementedError
end

#delete_dir(path) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

Raises:

  • (NotImplementedError)


139
140
141
# File 'lib/koine/filesystem/adapters/base.rb', line 139

def delete_dir(path)
  raise NotImplementedError
end

#has?(path) ⇒ Boolean

Returns Boolean.

Parameters:

  • path (String)

    path

Returns:

  • (Boolean)

    Boolean

Raises:

  • (NotImplementedError)


69
70
71
# File 'lib/koine/filesystem/adapters/base.rb', line 69

def has?(path)
  raise NotImplementedError
end

#list(path, recursive: false) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

  • recursive (Bool) (defaults to: false)

    path

Raises:

  • (NotImplementedError)


147
148
149
# File 'lib/koine/filesystem/adapters/base.rb', line 147

def list(path, recursive: false)
  raise NotImplementedError
end

#mime_type(path) ⇒ String

Parameters:

  • path (String)

    path

Returns:

  • (String)

Raises:

  • (FileNotFound)

    when source file does not exist or cannot be read



116
117
118
# File 'lib/koine/filesystem/adapters/base.rb', line 116

def mime_type(path)
  raise NotImplementedError
end

#read(path) ⇒ Object

Returns string.

Parameters:

  • path (String)

    path

Returns:

  • string

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



13
14
15
# File 'lib/koine/filesystem/adapters/base.rb', line 13

def read(path)
  raise NotImplementedError
end

#read_and_delete(path) ⇒ String

Parameters:

  • path (String)

    path

Returns:

  • (String)

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



87
88
89
# File 'lib/koine/filesystem/adapters/base.rb', line 87

def read_and_delete(path)
  raise NotImplementedError
end

#read_stream(path) ⇒ Object

Returns Boolean.

Parameters:

  • path (String)

    path

Returns:

  • Boolean

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



22
23
24
# File 'lib/koine/filesystem/adapters/base.rb', line 22

def read_stream(path)
  raise NotImplementedError
end

#rename(from, to) ⇒ void

This method returns an undefined value.

Parameters:

  • from (String)

    path

  • to (String)

    path

Raises:

  • (FileNotFound)

    when source file does not exist or cannot be read



97
98
99
# File 'lib/koine/filesystem/adapters/base.rb', line 97

def rename(from, to)
  raise NotImplementedError
end

#size(path) ⇒ Integer

Returns Number of bytes.

Parameters:

  • path (String)

    path

Returns:

  • (Integer)

    Number of bytes

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



125
126
127
# File 'lib/koine/filesystem/adapters/base.rb', line 125

def size(path)
  raise NotImplementedError
end

#update(path, contents, options: {}) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

  • contents (String)

    the new content

  • options (<Hash>) (defaults to: {})

    the options

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



51
52
53
# File 'lib/koine/filesystem/adapters/base.rb', line 51

def update(path, contents, options: {})
  raise NotImplementedError
end

#update_stream(path, contents, options: {}) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

  • contents (String)

    the new content

  • options (<Hash>) (defaults to: {})

    the options

Raises:

  • (FileNotFound)

    when file does not exist or cannot be read



62
63
64
# File 'lib/koine/filesystem/adapters/base.rb', line 62

def update_stream(path, contents, options: {})
  raise NotImplementedError
end

#write(path, contents, options: {}) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

  • contents (String)

    the content

  • options (<Hash>) (defaults to: {})

    the options

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/koine/filesystem/adapters/base.rb', line 31

def write(path, contents, options: {})
  raise NotImplementedError
end

#write_stream(path, contents, options: {}) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)

    path

  • contents (String)

    the content

  • options (<Hash>) (defaults to: {})

    the options

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/koine/filesystem/adapters/base.rb', line 40

def write_stream(path, contents, options: {})
  raise NotImplementedError
end