deleteOwnFile method

void deleteOwnFile(
  1. String principalId,
  2. String fileId
)

deleteFile: deletes an own file that is not attached; 409 conflict for an attached one.

Implementation

void deleteOwnFile(String principalId, String fileId) {
  final f = _ownFile(principalId, fileId);
  if (f.attachedTo != null) throw const FakeProblem(409, 'conflict');
  files.remove(fileId);
}