public sealed class RecycleBinUtil
Public NotInheritable Class RecycleBinUtil
Dim instance As RecycleBinUtil
public ref class RecycleBinUtil sealed
[<SealedAttribute>]
type RecycleBinUtil = class end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Private Sub Test()
Dim sb As New Global.System.Text.StringBuilder
' Get all the deleted items inside all the Recycle Bins.
Dim recycledItems As IEnumerable(Of ShellObject) = RecycleBin.MasterBin.Items
' Loop through the deleted Items (Ordered by las deleted).
For Each item As ShellObject In (From itm In recycledItems
Order By itm.Properties.GetProperty("System.Recycle.DateDeleted").ValueAsObject
Descending)
' Append the property bags information.
With sb
.AppendLine(String.Format("Full Name....: {0}", item.Name))
.AppendLine(String.Format("Item Name....: {0}", item.Properties.System.FileName.Value))
.AppendLine(String.Format("Deleted From.: {0}", item.Properties.GetProperty("System.Recycle.DeletedFrom").ValueAsObject))
.AppendLine(String.Format("Item Type....: {0}", item.Properties.System.ItemTypeText.Value))
.AppendLine(String.Format("Item Size....: {0}", CStr(item.Properties.System.Size.Value)))
.AppendLine(String.Format("Attributes...: {0}", [Enum].Parse(GetType(IO.FileAttributes), item.Properties.System.FileAttributes.Value.ToString())))
.AppendLine(String.Format("Date Deleted.: {0}", item.Properties.GetProperty("System.Recycle.DateDeleted").ValueAsObject))
.AppendLine(String.Format("Date Modified: {0}", CStr(item.Properties.System.DateModified.Value)))
.AppendLine(String.Format("Date Created.: {0}", CStr(item.Properties.System.DateCreated.Value)))
End With
MessageBox.Show(sb.ToString())
sb.Clear()
Next item
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
MasterBin | Gets the master recycle bin representation. The master Recycle Bin is the one that contains all the recycled items of all the recycle bins. |
Clean | Cleans the Recycle Bin of an specific Drive. |
DeleteItem | Permanently deletes a recycled Item. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetBinSize | Gets the accumulated size (in bytes) of the recycle bin of an specific drive. |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetItemsCount | Gets the count of the items that are inside the recycle bin of an specific drive. |
GetLastRecycledFile | Gets the last recycled file that is inside the recycle bin of an specific drive. |
GetLastRecycledFolder | Gets the last recycled folder that is inside the recycle bin of an specific drive. |
GetLastRecycledItem | Gets the last recycled item that is inside the recycle bin of an specific drive. |
GetRecycledFiles | Gets all the recycled files that are inside the recycle bin of an specific drive. |
GetRecycledFolders | Gets all the recycled folders that are inside the recycle bin of an specific drive. |
GetRecycledItems | Gets all the recycled items that are inside the recycle bin of an specific drive. |
GetType | Gets the Type of the current instance. (Inherited from Object) |
InvokeItemVerb(ShellObject, ItemVerbs) | Invokes a verb on a ShellObject item. |
InvokeItemVerb(ShellObject, String) | Invokes a custom verb on a ShellObject item. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
UndeleteItem | Undeletes a recycled Item. |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |