Method: Refile::Backend::FileSystem#read

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

#readString

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

Parameters:

  • id (String)

    The id of the file

Returns:

  • (String)

    The file’s contents



77
78
79
# File 'lib/refile/backend/file_system.rb', line 77

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