Class FuseFS::SqliteMapperFS
In: lib/fusefs/sqlitemapper.rb
Parent: PathMapperFS

Methods

map_row   mounted   new   rescan   scan   sighup   unmounted  

Attributes

db  [R]  The database connection
db_path  [R]  The database file
scan_id  [R]  Maintains a count of the number of times through the scan loop

Public Class methods

@param [String] db_path Path to Sqlite database @param [String] sql query @param [Hash] options see {PathMapperFS#initialize} @yieldparam [Row] row to map @yieldreturn [String,String,Hash<Symbol,Object>] newpath, realpath, options

  * newpath - the mapped path
  * realpath -  path to the real file
  * options -  additional information to store with this path

Public Instance methods

Maps a row into a new filepath

@param [Hash] row sqlite result hash for a row @return [String,String,Hash<Symbol,Object>] newpath, realpath, options

  * newpath - the mapped path
  * realpath -  path to the real file
  * options -  additional information to store with this path

@abstract

FuseFS callback when the filesystem is mounted Starts the scanning loop and performs the initial scan @api FuseFS

Trigger a rescan of the database

Executes the sql query and passes each row to map_row (or the block passed in {initialize})

Subclasses can override this method for pre/post scan processing, calling super as required

Rescan on HUP signal

FuseFS callback when filesystem is unmounted

Stops the database watching threads @api FuseFS

[Validate]