File I/O

Source: Internet
Author: User
#2 at Penny. The operations for reading and writing files in the network are completed by a large number of classes that support the concept of data flow. Therefore, File Guard 1 can be called file stream GUARD 1 #1/Page #2
#1 Penny #2 the document wood guard I involves. There are many net-related classes, all of which exist in # 8y # seven tons # 9m. in namespace I #6, only the related classes of File Guard are described here. For details and code examples, refer to the local M # 8DN: #1/Page #2.
#1 Penny #2 file and Stream Input/#6 #1/Page #2
#1 Penny #2 ms help: // month # 8.V# 8CC. v80/month # 8.M# 8DN. v80/month # 8.Vi# 7ual #8 tudi #5. v80.ch #7/dv_fxfund/html/4f4a33a9-66b7-4cd7-a285-4ad3da-94276cd2.htm #1/Page #2
#1 Penny #2 #1 # 7tr # 5ng # 2FIL #1 # 8TR # air-to-air missile files #1/# 7tr # 5ng #2 #1/Page #2
#1 Penny # 2FIL #1 # 8TR # the air-to-air missile file is. The lowest layer class of file wood GUARD 1 in the network. Its parent class is #1 # 7tr # 5ng #2 river #1/# 7tr # 5ng #2, #1/Page #2
#1 Penny #2 streams are the abstract base classes of all streams. Stream is an abstract concept of byte sequence, such as a file, an input/output device, an internal process Communication Pipeline, or a TCP/IP socket. Stream classes and Their Derived classes provide general views of these different types of input and output, so that programmers do not have to understand the specific details of the operating system and basic devices. #1/Page #2
#1 Penny # 2FIL #1 # 8TR # Level R of the air-to-air missile file # 9adXXX and orders # 9XXX only provide read/write operations in byte mode (bytes) #1/Page #2
#1 Penny #2 after use of fidelity #1 # 8TR # Remember to close the air-to-air missile object, or directly use the () block #1/Page #2
#1 Penny #2 #1 # 7tr # 5ng #2 BinaryR # 9ad # 9r/BinaryWrit # 9r, # 8tr # 9amR # 9ad # 9r/# 8tr #9 amWrit # 9r class #1/# 7tr # 5ng #2 #1/Page #2
#1 Penny # 2FIL #1 # 8TR # the air-to-air missile file or stream class can only perform bytes operation XXXR # 9ad. The network provides a more advanced # 9r/XXXWrit # 9r class for more advanced operations, such as reading numerical values, Boolean and text. #1/Page #2
#1 Penny #2 generally, the construction of these classes requires a stream object, or you can create a stream object internally, that is, they are attached to the stream and call their methods, for example, the # 8tr #9 amWrit # 9r Order #9 rLin #9, # 8tr #9 amWrit # 9r object will be used for low-level calls in the appropriate order of streaming, therefore, we can regard this type of class as a utility class that interacts between the stream and the Code #1/Page #2
#1 Penny #2 You can create a stream and pass it XXXR # 9ad to # 9r/XXXWrit # 9r object. You can also use XXXR # 9ad # 9r/XXXWrit # 9r directly. After using an object, remember to close it, or directly use the () block in the action file. The close action will automatically close the stream object on it. #1/Page #2
#1 Penny #2 XXXR # 9ad # 9r/XXXWrit # Another advantage of the 9r class is that they can automatically identify different encoding methods, or use one encoding method to specify the encoding scheme. #1/Page #2
#1 Penny #2 #1 # 7tr # 5ng #2 file/Phil # 9Inf #5 class #1/# 7tr # 5ng #2 #1/Page #2
#1 Penny #2 they share a common description in M # 8DN: Provides the instance method for creating, copying, deleting, moving, and opening files, and help create the fidelity #1 # 8TR # air-to-air missile object. #1/Page #2
#1 Penny #2 difference: #1/Page #2
#1 Penny #2 static methods of file classes perform security checks on all methods. If you want to reuse an object multiple times, you can use the corresponding instance method of fair_9inf #5, because security check is not always required. #1/Page #2
#1 Penny #2 the file method requires the path of the file currently operated. This path can be hard-coded or obtained through the static Directory class (such as Deere # 9ct # 5ry. G #9 tFil #9 #7 returns a string []). If you want to get a new instance, it can also be obtained through the same class as Deere # 9ct #5 ryInf #5 (for example, Deere # 9ct #5 ryInf # 5.G# 9 tFil #9 #7. Return a [] of Phil # 9Inf #5 ), for more information about the Directory and the specific application of Dir # 9ct #5 ryInf #5, see M # 8DN #1/Page #2.
#1 Penny #2 file class provides application #9 ndXXX, chrome # 9at # 9XXX, #6 pages #9 nXXX, Study #9 adAllXXX, A series of methods such as # 9AllXXX (degree of absence R #9 adLin #9, order # 9Lin #9) are used for file read/write operations, where append, research #9 adAll, command # 9All reads and writes files directly, and creates, the method returns a fidelity #1 # 8TR # air-to-air missile object (chrome # 9at #9 tons # 9xt returns # 8tr #9 amWrit # 9r) for further File Operations #1/Page #2
#1 Penny # 2Fil # 9Inf #5 class provides the application #9 ndXXX, chrome # 9at # 9XXX, #6 pages #9 nXXX (no command # 9XXX) these methods do not directly read or write files, but return fidelity #1 # 8TR # air-to-air missile, # 8tr # 9amR # 9ad # 9r or # 8tr #9 amWrit # 9r object for further File Operations #1/Page #2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.