Method: Atech::ObjectStore::File#delete

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

#deleteObject

Removes the file from the database



152
153
154
155
156
# File 'lib/atech/object_store/file.rb', line 152

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