Export (0) Print
Expand All

FileInfo Methods

The methods of the FileInfo class are listed here. For a complete list of FileInfo class members, see the FileInfo Members topic.

Public Methods

public methodAppendText

Supported by the .NET Compact Framework.

Creates a StreamWriter that appends text to the file represented by this instance of the FileInfo.
public methodCopyTo

Supported by the .NET Compact Framework.

Overloaded. Copies an existing file to a new file.
public methodCreate

Supported by the .NET Compact Framework.

Creates a file.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodCreateText

Supported by the .NET Compact Framework.

Creates a StreamWriter that writes a new text file.
public methodDelete

Supported by the .NET Compact Framework.

Overridden. Permanently deletes a file.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetObjectData (inherited from FileSystemInfo) Sets the SerializationInfo object with the file name and additional exception information.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodMoveTo

Supported by the .NET Compact Framework.

Moves a specified file to a new location, providing the option to specify a new file name.
public methodOpen

Supported by the .NET Compact Framework.

Overloaded. Opens a file with various read/write and sharing privileges.
public methodOpenRead

Supported by the .NET Compact Framework.

Creates a read-only FileStream.
public methodOpenText

Supported by the .NET Compact Framework.

Creates a StreamReader with UTF8 encoding that reads from an existing text file.
public methodOpenWrite

Supported by the .NET Compact Framework.

Creates a write-only FileStream.
public methodRefresh (inherited from FileSystemInfo)

Supported by the .NET Compact Framework.

Refreshes the state of the object.
public methodToString

Supported by the .NET Compact Framework.

Overridden. Returns the fully qualified path as a string.

Protected Methods

protected methodFinalize (inherited from Object)

Supported by the .NET Compact Framework.

Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

FileInfo Class | System.IO Namespace

Show:
© 2014 Microsoft