Open()

FileInfo::Open(FileMode) method

Opens the file represented by the current object in the specified mode for reading and writing and with no sharing.

FileStreamPtr System::IO::FileInfo::Open(FileMode mode)

Arguments

ParameterTypeDescription
modeFileModeSpecifies the mode in which to open the flie

Return Value

A FileStream object associated with the file represented by the current object

FileInfo::Open(FileMode, FileAccess) method

Opens the file represented by the current object in the specified mode, with the specified access type and with no sharing.

FileStreamPtr System::IO::FileInfo::Open(FileMode mode, FileAccess access)

Arguments

ParameterTypeDescription
modeFileModeSpecifies the mode in which to open the flie
accessFileAccessThe requested access type

Return Value

A FileStream object associated with the file represented by the current object

FileInfo::Open(FileMode, FileAccess, FileShare) method

Opens the file represented by the current object in the specified mode, with the specified access type and sharing option.

FileStreamPtr System::IO::FileInfo::Open(FileMode mode, FileAccess access, FileShare share)

Arguments

ParameterTypeDescription
modeFileModeSpecifies the mode in which to open the flie
accessFileAccessThe requested access type
shareFileShareThe type of access that other FileStream objects have to the opened file

Return Value

A FileStream object associated with the file represented by the current object

See Also