Method: Conduit::Storage::File::ClassMethods#read

Defined in:
lib/conduit/storage/file.rb

#read(key) ⇒ Object

Read a file

e.g.

> Conduit::Storage.read(‘/path/to/file’)



51
52
53
54
55
# File 'lib/conduit/storage/file.rb', line 51

def read(key)
  ::File.read(storage_path.join(key.to_s))
rescue Errno::ENOENT
  nil
end