public bool DeleteFile(string path) { FileInfoEx f = new FileInfoEx(path); BblLibraryNode parentNode = FindChild(f.Parent); BblLibraryNode node = null; if (parentNode?.Children != null) { foreach (var n in parentNode.Children) { if (n.Path == path) { node = n; break; } } } if (parentNode != null && parentNode is BblBookDirectory) { return(parentNode.DeleteChildFile(f)); } else if (node != null) { node.OnFileSystemEntryDeleted(); } return(false); }
public bool DeleteDirectory(string path) { DirectoryInfoEx d = new DirectoryInfoEx(path); BblLibraryNode node = FindChild(d); if (node != null) { node.OnFileSystemEntryDeleted(); } return(false); }