Name

FileInfo

Synopsis

Like the parallels between Directory and DirectoryInfo, this class offers an object-centric spin on the shared functions offered in the File type.

Public NotInheritable Class FileInfo : Inherits FileSystemInfo
' Public Constructors
   Public Sub New( ByVal fileName As String) 
' Public Instance Properties
   Public ReadOnly Property Directory As DirectoryInfo  
   Public ReadOnly Property DirectoryName As String  
   Overrides Public ReadOnly Property Exists As Boolean  
   Public ReadOnly Property Length As Long  
   Overrides Public ReadOnly Property Name As String  
' Public Instance Methods
   Public Function AppendText() As StreamWriter  
   Public Function CopyTo(
        ByVal destFileName As String) As FileInfo  
   Public Function CopyTo(ByVal destFileName As String, 
        ByVal overwrite As Boolean) As FileInfo  
   Public Function Create() As FileStream  
   Public Function CreateText() As StreamWriter  
   Overrides Public Sub Delete() 
   Public Sub MoveTo( ByVal destFileName As String) 
   Public Function Open(ByVal mode As FileMode) As FileStream  
   Public Function Open(ByVal mode As FileMode, 
        ByVal access As FileAccess) As FileStream  
   Public Function Open(ByVal mode As FileMode, 
        ByVal access As FileAccess, 
        ByVal share As FileShare) As FileStream  
   Public Function OpenRead() As FileStream  
   Public Function OpenText() As StreamReader  
   Public Function OpenWrite() As FileStream  
   Overrides Public Function ToString() As String  
End Class

Hierarchy

System.ObjectSystem.MarshalByRefObjectFileSystemInfo FileInfo

Returned By

DirectoryInfo.GetFiles() ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.