What Is FileInfo?
This section describes what is FileInfo - a .NET Framework class in the System.IO namespace. FileInfo class can be used to represent files in a file system to allow you to retrieve file storage information, retrieve and set other file attributes.
What Is FileInfo?
FileInfo is .NET Framework class under namespace of System.IO.
System.IO.FileInfo class can be used to represent files in a file system to
allow you to retrieve file storage information, retrieve and set other file attributes.
System.IO.FileInfo class can also be used to create, copy, delete or move files in the file system.
System.IO.FileInfo class can not be use retrieve version information stored inside PE (Portable Executable) files,
.exe and .dll files. See System.Diagnostics.FileVersionInfo class on how to retrieve version information from PE files.
.NET Framework classes related to files and file systems:
- System.IO.File - Holds static methods for file creation, copying, deletion and moving in the file system.
- System.IO.FileInfo - Represents a file in the file system for managing file attributes.
It can also be used to create, copy, delete and move a file.
- System.IO.Directory - Holds static methods for directory creation, copying, deletion and moving in the file system.
- System.IO.DirectoryInfo - Represents a directory in the file system for managing directory attributes.
It can also be used to create, copy, delete and move a directory.
- System.IO.Path - Holds static methods to manage path names of files or directories in the file system.
- System.IO.FileSystemInfo - Acts as the base class for both FileInfo and DirectoryInfo classes.
- System.Diagnostics.FileVersionInfo - Represents version information stored in a PE (Portable Executable) file.
Last update: 2012.
Table of Contents
About This Book
Introduction of C# (C Sharp)
Data Type and Variables
Logical Expressions and Conditional Statements
Arrays and Loop Statements
Data Type Features
Floating-Point Data Types
Passing Parameters to Methods
Execution Environment Class
Visual C# 2010 Express Edition
C# Compiler and Intermediate Language
Compiling C# Source Code Files
MSBuild - Microsoft Build Engine
Memory Usages of Processes
Multithreading in C#
Async Feature from C# 5
►What Is FileInfo?
Public Properties and Methods of FileInfo Class
Creating FileInfo Objects
FileVersionCopyFile.cs - Testing CopyTo() Method
WPF - Windows Presentation Foundation
Partial Classes and Partial Methods
PDF Printing Version