Method: Atech::ObjectStore::File#delete

Defined in:
lib/atech/object_store/file.rb

#deleteObject

Removes the file from the database



158
159
160
161
162
# File 'lib/atech/object_store/file.rb', line 158

def delete
  raise CannotEditFrozenFile, "This file has been frozen and cannot be deleted" if frozen?
  File.execute_query("DELETE FROM files WHERE id = #{@attributes['id']}")
  @frozen = true
end