NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IFilePersistanceService.GetStreamForFile

Gets a Stream of the file's contents from the specified file.

[Visual Basic]
Function GetStreamForFile( _
   ByVal fileName As String, _
   ByVal overwrite As Boolean _
) As Stream
[C#]
Stream GetStreamForFile(
   string fileName,
   bool overwrite
);
[C++]
Stream* GetStreamForFile(
   String* fileName,
   bool overwrite
) = 0;
[JScript]
function GetStreamForFile(
   fileName : String,
   overwrite : Boolean
) : Stream;

Parameters

fileName
The name of the file to be loaded. If a relative file name is used, the current directory will be searched. If the file does not exist, an ArgumentException will be thrown. If the file cannot be opened, an Exception describing the reason is thrown.
overwrite
If true, any existing file will be overwritten. Otherwise, a new file will be created if one doesn't exist, or opened if it does.

Return Value

The opened file as a Stream.

See Also

IFilePersistanceService Interface | IFilePersistanceService Members | System.ComponentModel.Design Namespace