Search notes:
System.IO.DirectoryInfo (class)
System.IO.DirectoryInfo
represents a
file system directory.
This class is mainly used to copy, move, rename, create and delete directories.
PS C:\> (get-item . ).GetType().FullName
System.IO.DirectoryInfo
Creation with relative path
If a System.IO.DirectoyInfo
object is created with a relative path, the object internally stores the path to the (potentially inexisting) directory that is constructed from the current directory and the relative path:
PS: 1 C:/Users/rene> [System.IO.DirectoryInfo] $x = '..'
PS: 2 C:/Users/rene> $x.FullName
C:\Users
PS: 3 C:/Users/rene> cd ..
PS: 4 C:/Users> $x.FullName
C:\Users
Properties and methods
Create()
CreateSubdirectory()
Delete()
EnumerateDirectories()
EnumerateFiles()
EnumerateFileSystemInfos()
Exists
GetDirectories()
GetFiles()
GetFileSystemInfos()
MoveTo()
Name
Parent
Root