VFile.Create Method
Namespace: Rebex.IO
Assembly: Rebex.FileSystem.dll
Create(String)
Method returns read/write instance of the VFileStream
for a file identified by the path
.
A caller must dispose the returned stream to ensure that the data
written to the stream are persisted.
Declaration
public static VFileStream Create(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file. |
Returns
Type | Description |
---|---|
VFileStream | A read/write instance of the VFileStream
for a file identified by the |
Remarks
Method creates the file if it does not exist. When the file exists then the content of the existing file is truncated.
Create(String, Int32)
Method returns read/write instance of the VFileStream
for a file identified by the path
.
A caller must dispose the returned stream to ensure that the data
written to the stream are persisted.
Declaration
public static VFileStream Create(string path, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file. |
Int32 | bufferSize | This argument is ignored. |
Returns
Type | Description |
---|---|
VFileStream | A read/write instance of the VFileStream
for a file identified by the |
Remarks
Method creates the file if it does not exist. When the file exists then the content of the existing file is truncated.
Create(String, Int32, FileOptions)
Method returns read/write instance of the VFileStream
for a file identified by the path
.
A caller must dispose the returned stream to ensure that the data
written to the stream are persisted.
Declaration
public static VFileStream Create(string path, int bufferSize, FileOptions options)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file. |
Int32 | bufferSize | This argument is ignored. |
FileOptions | options | Only DeleteOnClose option is supported. All other options are ignored. |
Returns
Type | Description |
---|---|
VFileStream | A read/write instance of the VFileStream
for a file identified by the |
Remarks
Method creates the file if it does not exist. When the file exists then the content of the existing file is truncated.