Class: HaveAPI::Fs::Components::Root

Inherits:
Directory show all
Defined in:
lib/haveapi/fs/components/root.rb

Overview

The root of the filesystem. There is only one instance of this object.

This directory contains some special hidden files:

  • .remote_control is used for IPC between the file system and executables
  • .cache contains some statistics about the cache
  • .assets/ contains static files for HTML help files

Constant Summary

Constants included from Help

Help::SEARCH_PATH

Instance Attribute Summary

Attributes inherited from HaveAPI::Fs::Component

#atime, #context, #ctime, #mtime

Instance Method Summary collapse

Methods inherited from Directory

#directory?

Methods included from Help

find!, included

Methods inherited from HaveAPI::Fs::Component

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

Constructor Details

#initializeRoot

Returns a new instance of Root.



12
13
14
# File 'lib/haveapi/fs/components/root.rb', line 12

def initialize()
  super()
end

Instance Method Details

#contentsObject



21
22
23
24
# File 'lib/haveapi/fs/components/root.rb', line 21

def contents
  super + %w(.client_version .fs_version .protocol_version) + \
    @api.resources.keys.map(&:to_s)
end

#resourcesObject



26
27
28
# File 'lib/haveapi/fs/components/root.rb', line 26

def resources
  @api.resources
end

#setupObject



16
17
18
19
# File 'lib/haveapi/fs/components/root.rb', line 16

def setup
  super
  @api = context.fs.api
end

#titleObject



30
31
32
# File 'lib/haveapi/fs/components/root.rb', line 30

def title
  context.url
end