Click or drag to resize

FileStream(String, FileMode, FileAccess) Constructor

Initialize the FileStream with the specified path, mode, and access.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public FileStream(
	string path,
	FileMode mode,
	FileAccess access
)

Parameters

path  String
Full path of the file the stream will encapsulate.
mode  FileMode
Specified mode to open the file. (Open, Append, etc.)
access  FileAccess
Constant that specifies the file access allowed by the stream. (Read, Write, etc.)
Exceptions
ExceptionCondition
InvalidDirectoryLocationExceptionInvalid directory location passed.
IOExceptionFile System error while attempting to open the stream.
DirectoryNotFoundExceptionInvalid directory location.
FileNotFoundExceptionThe file passed does not exist.
PathTooLongExceptionPath is great than 248 characters.
ArgumentExceptionInvalid argument passed.
ArgumentNullExceptionOne of the arguments is null.
SecurityExceptionThe user does not have the required permissions.
ArgumentOutOfRangeExceptionMode or FileAccess are invalid.
NotSupportedExceptionThe file is of a non-file system type.
UnauthorizedAccessExceptionThe access requested is not permitted for the specified file.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also