例如,一个类可能会打开一个流,并将其传递给另一个类以阅读来自文件的信息。
For example, one class may open a stream and pass it to another class to read information from a file.
有一点不是很重要但却很有帮助,初始打开每个应用程序时,都具有三个文件描述符,从0到2,分别表示标准输入、输出和错误流。
As a bit of helpful trivia, each application is initially opened with three file descriptors, 0 through 2, for the standard input, output, and error streams, respectively.
通过URL位置,您可以打开读属性文件的流。
With the URL location, you can open a stream to read the properties file.
第二个include使用流包装器打开Phar归档并且仅在归档中包括指定的文件。
The second include USES the stream wrapper to open the Phar archive and only includes the specified file inside the archive.
从文件中读取内容的操作是非常直截了当的:我们打开一个文件流对象,创建一个数组来放置数据,最后把所有数据都读到这个数组中。
The operation of reading from a file is very straight forward, we open a file stream, create an array to hold the data, and finally read all the data into the array.
解决这种问题的方法是,一旦自动创建了一个临时文件,就必须始终使用打开该文件时得到的文件描述符或文件流。
To resolve this, once you create a temporary file atomically, you must always use the file descriptor or file stream you got when you opened the file.
其他明显的改变就是,我们如何执行这些代码,“fileOpen”标识符不会马上打开文件,它只是一个工作流,一个等待执行的动作。
The other notable change is how we execute the work, the "fileOpen" identifier does not open the file immediately, it is a workflow, that is an action waiting to happen.
永远不要重新打开文件或者使用任何以文件为参数的操作——始终使用文件描述符或者相关的流,否则,tmpwatch竞争将引发一些问题。
Never reopen the file, or use any operations that use the file name as a parameter. Always use the file descriptor or associated stream — or the tmpwatch race issues will cause problems.
最后一个事件将会发生于每一个控件之上,然后,一直到结束.这时,所有的控件将会输出流并且不能够再被改变.在这个事件中,任何试图访问应答流的方法将都会出现错误.这个事件主要被用来清除善后工作,比如说数据库连接,打开的文件流,事件日志,或者其他的任务等等.
At this point, all controls have been rendered to the output stream and cannot be changed. During this event any attempt to access the response stream will result in an exception being thrown.
因此,我们打开一个文件流并创建一个二进制读者从中访问DWG文件。
So we open a file stream and create a binary reader from it to access the DWG file.
这个函数通常用于打开一个指定的文件使用预先定义的流:标准输入,标准输出,标准错误。
This function is typically used to open a specified file as one of the predefined streams: standard input, standard output, or standard error.
freopen函数使用指定的流打开一个指定的文件,如果它已经打开拉,首先关闭它。
Thee freopen function opens a specified file on a specified stream, closing the stream first if it is already open.
创建或者打开一个文件,文件流,目录,物理磁盘,卷,控制台缓冲,磁盘驱动器,通讯资源,邮槽,或命名管道。
Creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
这些函数必须在流打开后被调用(很明显,因为每个函数都需要一个有效的文件指针作为它的第一个参数),但是在对流有任何操作之前。
These functions must be called after the stream has been opened(obviously, since each requires a valid file pointer as its first argument) but before any other operation is performed on the stream.
这些函数必须在流打开后被调用(很明显,因为每个函数都需要一个有效的文件指针作为它的第一个参数),但是在对流有任何操作之前。
These functions must be called after the stream has been opened(obviously, since each requires a valid file pointer as its first argument) but before any other operation is performed on the stream.
应用推荐