delete method
Deletes the file rel, backing it up first. Nothing when it is
already gone. A symbolic link is deleted itself, not what it leads
to, and a rollback makes it again.
Implementation
void delete(String rel) {
_checkOpen();
final key = _inside(rel);
final path = project.path(key);
switch (FileSystemEntity.typeSync(path, followLinks: false)) {
case FileSystemEntityType.link:
if (_backUpLink(key)) _save();
retryOnLock(Link(path).deleteSync);
case FileSystemEntityType.file:
if (_backUpFile(key)) _save();
retryOnLock(File(path).deleteSync);
default:
// Gone already, or a folder: not this method's to delete.
}
}