vb.net barcode generator open source FILES, STREAMS, AND IO in C#

Encoder Data Matrix in C# FILES, STREAMS, AND IO

CHAPTER 20 FILES, STREAMS, AND IO
Printing DataMatrix In Visual C#.NET
Using Barcode printer for .NET Control to generate, create Data Matrix ECC200 image in .NET applications.
www.OnBarcode.com
ECC200 Decoder In C#
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
Table 20-7. System.IO.FileInfo Stream, Reader, and Writer Members
Encode UPC-A Supplement 2 In C#
Using Barcode drawer for .NET Control to generate, create GS1 - 12 image in VS .NET applications.
www.OnBarcode.com
Encode GTIN - 13 In C#.NET
Using Barcode creator for .NET Control to generate, create GTIN - 13 image in .NET framework applications.
www.OnBarcode.com
Method
Generating Linear Barcode In Visual C#.NET
Using Barcode drawer for Visual Studio .NET Control to generate, create 1D image in .NET framework applications.
www.OnBarcode.com
Draw QR Code 2d Barcode In Visual C#
Using Barcode creator for Visual Studio .NET Control to generate, create Denso QR Bar Code image in .NET applications.
www.OnBarcode.com
AppendText()
Making Code 128 Code Set B In C#.NET
Using Barcode maker for Visual Studio .NET Control to generate, create Code 128A image in .NET applications.
www.OnBarcode.com
Draw RM4SCC In C#.NET
Using Barcode maker for .NET framework Control to generate, create Royal Mail Barcode image in .NET applications.
www.OnBarcode.com
Description
Generate Data Matrix ECC200 In Visual C#.NET
Using Barcode creator for .NET framework Control to generate, create DataMatrix image in VS .NET applications.
www.OnBarcode.com
DataMatrix Generator In Java
Using Barcode generator for Eclipse BIRT Control to generate, create DataMatrix image in Eclipse BIRT applications.
www.OnBarcode.com
Returns a StreamWriter that will append text to the file. Returns a FileSteam that can be used to read from and write to the file. If the file already exists, it will be overwritten. Returns a StreamWriter that can be used to write to the file. Returns a FileStream in the modes specified by the FileMode and FileAccess enumeration parameters. Returns a read-only FileStream that can be used to read the contents of the file. Opens a StreamReader that can be used to read the contents of a text file. Opens a write-only FileStream to the file.
GTIN - 128 Printer In Java
Using Barcode creation for Eclipse BIRT Control to generate, create USS-128 image in BIRT reports applications.
www.OnBarcode.com
Linear 1D Barcode Creator In Java
Using Barcode encoder for Java Control to generate, create 1D image in Java applications.
www.OnBarcode.com
Create()
PDF417 Maker In Java
Using Barcode encoder for Java Control to generate, create PDF417 image in Java applications.
www.OnBarcode.com
Drawing 2D In Java
Using Barcode creator for Java Control to generate, create 2D Barcode image in Java applications.
www.OnBarcode.com
CreateText()
UPC-A Supplement 5 Creator In Java
Using Barcode generation for Java Control to generate, create UPC-A Supplement 2 image in Java applications.
www.OnBarcode.com
Code 3 Of 9 Drawer In Objective-C
Using Barcode generator for iPad Control to generate, create Code 3/9 image in iPad applications.
www.OnBarcode.com
Open(FileMode) Open(FileMode, FileAccess) OpenRead()
Scan EAN13 In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
PDF417 Creator In .NET
Using Barcode drawer for Reporting Service Control to generate, create PDF-417 2d barcode image in Reporting Service applications.
www.OnBarcode.com
OpenText()
Barcode Printer In .NET Framework
Using Barcode creation for VS .NET Control to generate, create Barcode image in VS .NET applications.
www.OnBarcode.com
PDF417 Generator In VS .NET
Using Barcode generator for ASP.NET Control to generate, create PDF 417 image in ASP.NET applications.
www.OnBarcode.com
OpenWrite()
Using the DirectoryInfo Class
The DirectoryInfo class shares some common traits with FileInfo but works on directories. In addition to working with specific directories, the DirectoryInfo class can be used to search for files and subdirectories. The constructor for the DirectoryInfo class takes a single string parameter containing the path to the directory you want to work with. Here is an example:
DirectoryInfo myDir = new DirectoryInfo(@"C:\");
You can create DirectoryInfo objects for directories that do not exist and then use the object methods to create the directory. I have split the members of the DirectoryInfo class into two sections. Table 20-8 summarized the methods and properties of the DirectoryInfo class that operate on the current directory.
CHAPTER 20 FILES, STREAMS, AND IO
Table 20-8. System.IO.DirectoryInfo Members That Operate on the Current Directory
Members
Create()
Description
Creates the directory specified in the constructor; does nothing if the directory already exists. Creates a directory with the specified name inside the current directory. Returns the time that the directory was created. The first version of this method will delete the directory if it is empty. The second version will delete the files and subdirectories if the parameter value is true. Returns true if the directory specified by the constructor parameter exists and is a directory. Returns the time that the directory was last accessed. Returns the time that the directory was last modified. Moves the directory (and its contents) to the path specified by the string parameter. Returns the name of the directory. Returns a DirectoryInfo object representing the parent directory Rereads the information about the directory from the file system. Returns a DirectoryInfo object representing the root directory.
CreateSubDirectory(string)
CreationTime Delete() Delete(bool)
Exists
LastAccessTime LastWriteTime MoveTo(string)
Name Parent
Refresh()
Root
Listing 20-8 demonstrates the use of some of these methods and properties. Listing 20-8. Using the Basic Members of the DirectoryInfo Class using System; using System.IO; class Listing 08 {
CHAPTER 20 FILES, STREAMS, AND IO
static void Main(string[] args) { DirectoryInfo myDir = new DirectoryInfo(@"C:\Program Files"); // does the directory exist bool dirExists = myDir.Exists; Console.WriteLine("Directory exists {0}", dirExists); // what is the name of the directory string dirName = myDir.Name; Console.WriteLine("Directory name: {0}", dirName); // what is the parent directory name string parentName = myDir.Parent.Name; Console.WriteLine("Parent name: {0}", parentName); // what is the root name string rootName = myDir.Root.Name; Console.WriteLine("Root name: {0}", rootName); // wait for input before exiting Console.WriteLine("Press enter to finish"); Console.ReadLine(); } } Compiling and running Listing 20-8 gives the following results: Directory exists True Directory name: Program Files Parent name: C:\ Root name: C:\ Press enter to finish The remaining methods in the DirectoryInfo class can be used to search for files and directories. These methods work much like their equivalents in the Directory class, except that the results are instances of DirectoryInfo and FileInfo and the search is always relative to the directory specified by the constructor parameter. These methods are described in Table 20-9. Table 20-9. System.IO.DirectoryInfo Search Members
Method
GetDirectories() GetDirectories(string) GetDirectories(string, SearchOption)
Description
Returns an array of DirectoryInfo objects representing the subdirectories of the current directory. The overloaded versions of this method allow you to filter the results and specify whether the subdirectories themselves should be searched.
Copyright © OnBarcode.com . All rights reserved.