Method: FSDB::Database#get_file_id
- Defined in:
- lib/fsdb/database.rb
#get_file_id(abs_path) ⇒ Object
Convert an absolute path to a unique key for the cache, raising MissingFileError if the file does not exist.
208 209 210 211 212 213 214 215 216 217 |
# File 'lib/fsdb/database.rb', line 208 def get_file_id(abs_path) _get_file_id(abs_path) rescue Errno::ENOTDIR # db['x'] = 0; db.edit 'x/' do end raise NotDirError rescue Errno::ENOENT raise MissingFileError, "Cannot find file at #{abs_path}" rescue Errno::EINTR retry end |