.NET
  Home arrow .NET arrow Page 8 - Utilize the Full Functionality of the Whid...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Utilize the Full Functionality of the Whidbey File Management
By: Benoyraj Baskaran
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 5
    2004-08-17

    Table of Contents:
  • Utilize the Full Functionality of the Whidbey File Management
  • Classes that Supports System.IO.namespace
  • More Classes and Public Methods
  • Public Methods with File Class
  • FileStream and Other Classes
  • IOException Class and Others
  • System.Security.Permissions
  • Mode, Share and Access of Files

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Utilize the Full Functionality of the Whidbey File Management - Mode, Share and Access of Files


    (Page 8 of 8 )

    FileMode

    FileMode parameter control has the following members:

    • Append – Append to an existing file or create a new file if the file not exists
    • Create -  Create a new file
    • Open – Open the file
    • OpenCreate -  Open a file if exists or it will create a file
    • Truncate – Remove all the contents so that its size is zero bytes

    Example:

     Dim objStreamReader As New
     StreamReader(“C:\benoy\Mytext.txt”)
          MessageBox.Show(objStreamReader.ReadToEnd()
          objStreamReader.Close()

    FileShare

    FileShare enumeration allows you to control the share permission to access the FileStreams.

    Some of the members included in the FileShare enumerations are Read, ReadWrite, Write, None, Inheritable etc.

    Read command allows you to opening the file for reading.  
    ReadWrite command allows you to opening the file for reading and writing.

    Write command allows you to opening the file for writing.

      Dim objFileStream As New
     FileStream(“C:\benoy\Mytext.txt”, _
          FileMode. OpenOrCreateOpen,
                     FileAccess.ReadWrite,
                     FileShare.ReadWrite)

    FileAccess

    FileAccess enumeration allows you to control the permission to access the FileStreams.

    Some of the members included in the FileAccess enumerations are Read, ReadWrite, Write  etc.

    Conclusion

    In this article we found out how to manage windows file operations using different file level operation commands. It allows you to set file permissions, modes, access and sharing of files using VB.NET environment. 

    • File System Management and its uses
    • File Permissions
    • File modes, File Access, File Shares


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    .NET ARTICLES

    - Introducing .NET
    - Building Business Objects for an Application
    - Methods for an Application`s Business Logic ...
    - Properties of an Application`s Business Logi...
    - Classes and Properties in an Application`s B...
    - Organizing Code for the Business Logic Layer...
    - Building the Business Logic Layer
    - Completing a Business Layer with Windows Wor...
    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek