Class: HaveAPI::Fs::Components::ProxyFile
- Inherits:
-
File
- Object
- HaveAPI::Fs::Component
- File
- HaveAPI::Fs::Components::ProxyFile
- Defined in:
- lib/haveapi/fs/components/proxy_file.rb
Instance Attribute Summary
Attributes inherited from HaveAPI::Fs::Component
#atime, #context, #ctime, #mtime
Instance Method Summary collapse
-
#initialize(path) ⇒ ProxyFile
constructor
A new instance of ProxyFile.
- #read ⇒ Object
- #size ⇒ Object
- #times ⇒ Object
Methods inherited from File
#file?, #raw_close, #raw_open, #raw_read, #raw_sync, #raw_truncate, #raw_write, #write
Methods inherited from HaveAPI::Fs::Component
#abspath, #bound=, #bound?, children_reader, component, #contents, #directory?, #executable?, #file?, #find, inherited, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #setup, #title, #unsaved?, #use, #writable?
Constructor Details
#initialize(path) ⇒ ProxyFile
Returns a new instance of ProxyFile.
3 4 5 6 |
# File 'lib/haveapi/fs/components/proxy_file.rb', line 3 def initialize(path) super() @path = path end |
Instance Method Details
#read ⇒ Object
17 18 19 |
# File 'lib/haveapi/fs/components/proxy_file.rb', line 17 def read ::File.read(@path) end |
#size ⇒ Object
13 14 15 |
# File 'lib/haveapi/fs/components/proxy_file.rb', line 13 def size ::File.size(@path) end |
#times ⇒ Object
8 9 10 11 |
# File 'lib/haveapi/fs/components/proxy_file.rb', line 8 def times st = ::File.stat(@path) [st.atime, st.mtime, st.ctime] end |