FileInfo Members
.NET Framework Class Library
FileInfo Members

Provides instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.

The FileInfo type exposes the following members.

  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFileInfoInitializes a new instance of the FileInfo class, which acts as a wrapper for a file path.
Top
  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkAppendTextCreates a StreamWriter that appends text to the file represented by this instance of the FileInfo.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopyToOverloaded. Copies an existing file to a new file.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCreateCreates a file.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCreateTextCreates a StreamWriter that writes a new text file.
Public methodDecryptDecrypts a file that was encrypted by the current account using the Encrypt method.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkDeletePermanently deletes a file. (Overrides FileSystemInfo..::.Delete()()().)
Public methodEncryptEncrypts a file so that only the account used to encrypt the file can decrypt it.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFinalizeAllows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAccessControlOverloaded. Gets a FileSecurity object that encapsulates the access control list (ACL) entries for the file described by the current FileInfo object.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetObjectDataSets the SerializationInfo object with the file name and additional exception information. (Inherited from FileSystemInfo.)
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkMemberwiseCloneOverloaded.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkMoveToMoves a specified file to a new location, providing the option to specify a new file name.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOpenOverloaded. Opens a file with various read/write and sharing privileges.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOpenReadCreates a read-only FileStream.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOpenTextCreates a StreamReader with UTF8 encoding that reads from an existing text file.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOpenWriteCreates a write-only FileStream.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkRefreshRefreshes the state of the object. (Inherited from FileSystemInfo.)
Public methodReplaceOverloaded. Replaces the contents of a specified file with the file described by the current FileInfo object, deleting the original file, and creating a backup of the replaced file.
Public methodSetAccessControlApplies access control list (ACL) entries described by a FileSecurity object to the file described by the current FileInfo object.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkToStringReturns the path as a string. (Overrides Object..::.ToString()()().)
Top
  NameDescription
Protected fieldSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFullPathRepresents the fully qualified path of the directory or file. (Inherited from FileSystemInfo.)
Protected fieldSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOriginalPathThe path originally specified by the user, whether relative or absolute. (Inherited from FileSystemInfo.)
Top
  NameDescription
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkAttributesGets or sets the FileAttributes of the current FileSystemInfo. (Inherited from FileSystemInfo.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkCreationTimeGets or sets the creation time of the current FileSystemInfo object. (Inherited from FileSystemInfo.)
Public propertyCreationTimeUtcGets or sets the creation time, in coordinated universal time (UTC), of the current FileSystemInfo object. (Inherited from FileSystemInfo.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkDirectoryGets an instance of the parent directory.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkDirectoryNameGets a string representing the directory's full path.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkExistsGets a value indicating whether a file exists. (Overrides FileSystemInfo..::.Exists.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkExtensionGets the string representing the extension part of the file. (Inherited from FileSystemInfo.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkFullNameGets the full path of the directory or file. (Inherited from FileSystemInfo.)
Public propertyIsReadOnlyGets or sets a value that determines if the current file is read only.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkLastAccessTimeGets or sets the time the current file or directory was last accessed. (Inherited from FileSystemInfo.)
Public propertyLastAccessTimeUtcGets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed. (Inherited from FileSystemInfo.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkLastWriteTimeGets or sets the time when the current file or directory was last written to. (Inherited from FileSystemInfo.)
Public propertyLastWriteTimeUtcGets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to. (Inherited from FileSystemInfo.)
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkLengthGets the size, in bytes, of the current file.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkNameGets the name of the file. (Overrides FileSystemInfo..::.Name.)
Top
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
So how do you determine if the file is readable      DGB75   |   Edit   |   Show History
IsReadOnly is a great option, but how do I determine if I can read a file based on the current security settings? In C, I can call stat() (at least in the unix world) and go. I don't want to have the overhead of opening the file since I'm just doing validation, I just want to do the security check. Ideas?
Tags What's this?: Add a tag
Flag as ContentBug
Processing
Page view tracker