This documentation is archived and is not being maintained.

FileSystemInfo.FullName Property

Gets the full path of the directory or file.

[Visual Basic]
Public Overridable ReadOnly Property FullName As String
public virtual string FullName {get;}
public: __property virtual String* get_FullName();
public function get FullName() : String;

Property Value

A string containing the full path.


Exception Type Condition
SecurityException The caller does not have the required permission.


For example, for a file c:\NewFile.txt, this property returns "c:\NewFile.txt".

The following table lists examples of other typical or related I/O tasks.

To do this... See the example in this topic...
Create a text file. Writing Text to a File
Write to a text file. Writing Text to a File
Read from a text file. Reading Text from a File
Sort files in a directory by size. GetFileSystemInfos
See the files in a directory. Name
See the subdirectories of a directory. GetDirectories


Determine if a file exists. File.Exists
Determine if a directory exists. Directory.Exists
Retrieve only the directory name from a path. GetDirectoryName
Retrieve the file name and extension from a path. GetFileName
Change the extension of a file. ChangeExtension


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

.NET Framework Security: 

See Also

FileSystemInfo Class | FileSystemInfo Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File