System::IO::File::Open method

File::Open(const String&, FileMode) method

Opens the specified file in the specified mode for reading and writing and with no sharing.

static FileStreamPtr System::IO::File::Open(const String &path, FileMode mode)
ParameterTypeDescription
pathconst String&The path of the file to open
modeFileModeSpecifies the mode in which to open the file

ReturnValue

A FileStream object associated with the opened file

See Also

File::Open(const String&, FileMode, FileAccess, FileShare) method

Opens the specified file in the specified mode, with the specified access type and sharing option.

static FileStreamPtr System::IO::File::Open(const String &path, FileMode mode, FileAccess access, FileShare share=FileShare::None)
ParameterTypeDescription
pathconst String&The path of the file to open
modeFileModeSpecifies the mode in which to open the file
accessFileAccessThe requested access type
shareFileShareThe type of access that other FileStream objects have to the opened file

ReturnValue

A FileStream object associated with the opened file

See Also