DelphiBasics
  Home  |  Delphi .net Home  |  System.IO NameSpace
 .NET Framework
 Namespace References

 System
 System.Collections
 System.Globalization
 System.IO
 
  BinaryReader  Class 
  BinaryWriter  Class 
  BufferedStream  Class 
  Directory  Class 
  DirectoryInfo  Class 
  File  Class 
  FileAccess  Enumeration 
  FileAttributes  Enumeration 
  FileInfo  Class 
  FileMode  Enumeration 
  FileShare  Enumeration 
  FileStream  Class 
  FileSystemWatcher  Class 
  MemoryStream  Class 
  Path  Class 
  SeekOrigin  Enumeration 
  StreamReader  Class 
  StreamWriter  Class 
  StringReader  Class 
  StringWriter  Class 

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 php Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders


 
 
  System.IO.Path Class
 
 Description
The Path class is highly platform dependant. It allows a string to be built that contains an absolute or relative path to a directory or files or other platform resources.
 
All of the Path methods are static - they all work on a string that is used in classes that access files or other resources.
 
The platform independence is important. On Windows platforms, absolute paths always start with a drive letter - on other platforms or devices, this is not so. The implementation of Path on the target platform contains all the directory/file/resource naming rules for that platform.
 
Since Path is only ever concerned with path string building and validation, no access to a directory, file or resource is ever performed by this class.
 Methods
ChangeExtension  Changes the Extension of the File Name in the specified Path string
Combine  Combines two Path strings into a single Path string
GetDirectoryName  Gets the Directory (folder) name part of the specified Path string
GetExtension  Returns the Extension value, if present, for a given Path string
GetFileName  Gets the FileName from the specified Path string
GetFileNameWithoutExtension  Gets the FileName from the specified Path string
GetFullPath  Gets the full path for a relative Path string
GetPathRoot  Gets the Root Device or Folder for the specified Path string
GetTempFileName  Gets a temporary file in the temporary Directory (folder) on the current machine
GetTempPath  Gets the Directory (folder) for temporary files on the current machine
HasExtension  Returns True if the specified Path string includes a file name with extension
IsPathRooted  Returns True if the specified Path contains an absolute path

 Fields
AltDirectorySeparatorChar  Char  Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
DirectorySeparatorChar  Char  Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
InvalidPathChars  Array of Char  Provides a platform-specific array of characters that cannot be specified in path string arguments passed to members of the Path class.
PathSeparator  Char  A platform-specific separator character used to separate path strings in environment variables.
VolumeSeparatorChar  Char  Provides a platform-specific volume separator character.

 Microsoft MSDN links
 
System.IO
System.IO.path
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page