Method: Refile::Backend::FileSystem#read

Defined in:
lib/refile/backend/file_system.rb

#read(id) ⇒ String

Return the entire contents of the uploaded file as a String.

Parameters:

  • id (Sring)

    The id of the file

Returns:

  • (String)

    The file's contents



75
76
77
# File 'lib/refile/backend/file_system.rb', line 75

def read(id)
  ::File.read(path(id)) if exists?(id)
end