public void Remove(string[] urls)
{
if (urls == null)
{
throw new ArgumentNullException("urls");
}
foreach (var url in urls)
{
var path = GetAbsoluteStoragePathFromUrl(url);
// get the file attributes for file or directory
var attr = File.GetAttributes(path);
//detect whether its a directory or file
if ((attr & FileAttributes.Directory) == FileAttributes.Directory)
{
Directory.Delete(path, true);
}
else
{
File.Delete(path);
}
}
}