Class: GDSync::FileSystem::AbstractDir

Inherits:
Object
  • Object
show all
Defined in:
lib/file_system.rb

Instance Method Summary collapse

Instance Method Details

#create_dir!(title) ⇒ AbstractDir

Create sub directory.


119
120
121
# File 'lib/file_system.rb', line 119

def create_dir!(title)
  raise 'abstract method "create_dir!" called'
end

#create_file_with_read_io!(io, title, mtime, birthtime) ⇒ AbstractFile

Upload a file with 'title' by reading 'io', and return AbstractFile derived object.

Raises:

  • NotSupportedError when 'create_file' operation is not supported by the filesystem.


130
131
132
# File 'lib/file_system.rb', line 130

def create_file_with_read_io!(io, title, mtime, birthtime)
  raise 'abstract method "create_file_with_read_io!" called'
end

#create_write_io!(title) ⇒ AbstractFile, IO

Create a file with 'title', and return IO object to write to it.

Raises:

  • NotSupportedError when 'create_file' operation is not supported by the filesystem.


137
138
139
# File 'lib/file_system.rb', line 137

def create_write_io!(title)
  raise 'abstract method "create_write_io!" called'
end

#delete!Object

Delete directory recursively.


142
143
144
# File 'lib/file_system.rb', line 142

def delete!
  raise 'abstract method "delete!" called'
end

#entries(&block) ⇒ Object

Enumerate contents of directory.


106
107
108
# File 'lib/file_system.rb', line 106

def entries(&block)
  raise 'abstract method "entries" called'
end

#fsFileSystem

A FileSystem object which manages this AbstractDir object.


112
113
114
# File 'lib/file_system.rb', line 112

def fs
  raise 'abstract method "fs" called'
end

#is_dir?Boolean


101
102
103
# File 'lib/file_system.rb', line 101

def is_dir?
  true
end

#pathString

Path string (ex. “googledrive://Some/Directory”)


148
149
150
# File 'lib/file_system.rb', line 148

def path
  raise 'abstract method "path" called'
end

#titleString

Name of directory


97
98
99
# File 'lib/file_system.rb', line 97

def title
  raise 'abstract method "title" called'
end