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.File Class
 
 Description
Use this class for one-off operations on a file. Use the FileInfo class to encapsulate a file on which you want to perform a number of operations (it is more efficient because security checks are only performed once).
 
All of the methods of this class are static - meaning that they are available by simply supplying the path of a file that you want to create, modify or delete, access, or inspect.
 Methods
AppendText  Returns a StreamWriter object allowing appending to the specified file
Copy  Copies the specified file to a new location, optionally with a new name
Create  Creates a file with the specified file name
CreateText  Creates a file with the specified file name
Delete  Deletes the specified file
Exists  Returns true if the specified file exists
GetAttributes  Get the attributes of the specified file
GetCreationTime  Gets the date and time that the specified File or Directory was created
GetLastAccessTime  Gets the date and time that the specified File or Directory was last accessed
GetLastWriteTime  Gets the date and time that the specified File or Directory was last written to
Move  Moves the specified file to a new location, optionally with a new name
Open  Opens the specified file for the specified read or write access
OpenRead  Opens the specified file for the read only access
OpenText  Opens the specified file for the read only text access
OpenWrite  Opens the specified file for writing to only
SetAttributes  Set the attributes of the specified file
SetCreationTime  Sets the Creation date and time of the specified file
SetLastAccessTime  Sets the Last Access date and time of the specified file
SetLastWriteTime  Sets the Last Write date and time of the specified file


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