Sharpen.FileHelper.Delete C# (CSharp) Method

Delete() public method

public Delete ( FilePath path ) : bool
path FilePath
return bool
		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;
		}