public virtual bool Delete (FilePath path)
{
if (Directory.Exists (path)) {
if (Directory.GetFileSystemEntries (path).Length != 0)
return false;
MakeDirWritable (path);
Directory.Delete (path, true);
return true;
}
else if (File.Exists(path)) {
MakeFileWritable (path);
File.Delete (path);
return true;
}
return false;
}