This documentation is for the old version. Go to the latest Graphics Mill docs

Pidl Class

The class represents a wrapper class for PIDL structures management.

Namespace: Aurigma.GraphicsMill.WinControls
Assembly: Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)

Syntax

Visual Basic
Public NotInheritable Class Pidl _
	Implements IDisposable
C#
public sealed class Pidl : IDisposable

Remarks

Every object of the file system (like files, folders, drives, etc.) may be identified by the pointer to an item identifier list (or abbreviated - PIDL). Moreover, any object of the Shell namespace may be identified by the PIDL (for example, connected USB storage devices, digital photo cameras, network resources, etc). So, the class provides access to objects of the shell namespace.

To get a PIDL by the path string, you can use the Create(String) method. Also, this method enables to create PIDL for special object of the file system such as My Document folder and similar ones. Just pass a member of the StandardFolder enumeration to this method.

The most exciting feature of this class is possibility to get children of a file system object. This way you can organize a file system tree which includes not only files and folder, but also removable media, special folder, etc. To do it, you should create a root PIDL based on the Desktop and recursively get its subitems. The PIDL distinguishes two kinds of subitems: files and folders.

Files are objects of the file system which cannot have any subitems. They always has a binary content available through the Stream property. To check whether the current PIDL is a file, use the Type property. It should be equal to File.

Contrariwise, folders are objects which can contain subitems. Not only directories can be interpreted as folders, but also system drives, removable media, etc. Folders do not have binary content and its Stream property is not valid. To check whether the current PIDL is a file, use the Type property. It should be equal to Folder. To get all files of the current folder, use the Files property. If you need to get subfolder only, use the Folders property. To get both folders and files, use the Items property. The parent PIDL can be received using the Parent property.

If you want to convert the PIDL to a common file system path string, you can just use the Path property. However keep in mind, that not each PIDL represents physical file or folder. In this case you will get the empty string.

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.WinControls.Pidl

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

Object Model









See Also

Reference