Working with Files and Directories using ASP.NET
page 6 of 8
by SANJIT SIL
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 63456/ 118

FileMode Enumeration

Specifies whether the contents of an existing file are preserved or overwritten and whether requests to create an existing file cause an exception.

Append

It opens the file if it exists and seeks to the end of the file, or creates a new file.  FileMode.Append can only be used in conjunction with FileAccess.Write.

Create

It specifies that the operating system should create a new file.  The file will be overwritten if it already exists.

CreateNew

It specifies that the operating system should create a new file.

Open

It specifies that the operating system should open an existing file.  The ability to open the file is dependent on the value of enumeration specified by FileAccess.

OpenCreate

It specifies that the operating system should open a file if it exists.  Otherwise, a new file will be created.

Truncate

It specifies that the operating system should open an existing file.  Once opened, the file should be truncated so that its size is zero bytes.


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2022 ASPAlliance.com  |  Page Processed at 2022-09-24 4:29:28 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search