Directory.GetParent Method


Directory.GetParent Method

Class

System.IO.Directory

Syntax

     Dim result As DirectoryInfo = GetParent(path) 


path (required; String)

A valid path to a directory

Description

The GetParent method returns a DirectoryInfo object representing the parent directory of path.

Usage at a Glance

  • path can be either an absolute path or a relative path from the current directory.

  • path can be either a path on the local system, the path of a mapped network drive, or a UNC path.

  • path cannot contain wildcard characters.

  • The DirectoryInfo object contains many useful members, including informational properties and directory manipulation tools.

Version Differences

Visual Basic 2005 includes My.Computer.FileSystem.GetDirectoryInfo and My.Computer.FileSystem.GetParentPath methods that, when used together, provide one method of achieving similar functionality.

See Also

Directory.GetDirectoryRoot Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net