Class: HaveAPI::Fs::Components::File

Inherits:
HaveAPI::Fs::Component show all
Defined in:
lib/haveapi/fs/components/file.rb

Instance Attribute Summary

Attributes inherited from HaveAPI::Fs::Component

#atime, #context, #ctime, #mtime

Instance Method Summary collapse

Methods inherited from HaveAPI::Fs::Component

#abspath, #bound=, #bound?, children_reader, component, #contents, #directory?, #executable?, #find, inherited, #initialize, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #setup, #times, #title, #unsaved?, #use, #writable?

Constructor Details

This class inherits a constructor from HaveAPI::Fs::Component

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/haveapi/fs/components/file.rb', line 3

def file?
  true
end

#raw_close(path, raw = nil) ⇒ Object



39
40
41
# File 'lib/haveapi/fs/components/file.rb', line 39

def raw_close(path, raw = nil)

end

#raw_open(path, mode, rfusefs = nil) ⇒ Object



19
20
21
# File 'lib/haveapi/fs/components/file.rb', line 19

def raw_open(path, mode, rfusefs = nil)
  nil
end

#raw_read(path, offset, size, raw = nil) ⇒ Object



23
24
25
# File 'lib/haveapi/fs/components/file.rb', line 23

def raw_read(path, offset, size, raw = nil)

end

#raw_sync(path, datasync, raw = nil) ⇒ Object



31
32
33
# File 'lib/haveapi/fs/components/file.rb', line 31

def raw_sync(path, datasync, raw = nil)

end

#raw_truncate(path, offset, raw = nil) ⇒ Object



35
36
37
# File 'lib/haveapi/fs/components/file.rb', line 35

def raw_truncate(path, offset, raw= nil)

end

#raw_write(path, offset, size, buf, raw = nil) ⇒ Object



27
28
29
# File 'lib/haveapi/fs/components/file.rb', line 27

def raw_write(path, offset, size, buf, raw = nil)

end

#readObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/haveapi/fs/components/file.rb', line 11

def read
  raise NotImplementedError
end

#sizeObject



7
8
9
# File 'lib/haveapi/fs/components/file.rb', line 7

def size
  read.length
end

#write(str) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/haveapi/fs/components/file.rb', line 15

def write(str)
  raise NotImplementedError
end