nsIFileStreams 编辑
The nsIFileStreams
interface is an input stream that allows you to read from a file.
netwerk/base/public/nsIFileStreams.idl
Scriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3)Inherits from: nsISupports
Method overview
void init(in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); |
Constants
Constants | Value | Description |
DELETE_ON_CLOSE | 1<<1 | If this is set, the file will be deleted by the time the stream is closed. It may be removed before the stream is closed if it is possible to delete it and still read from it. If OPEN_ON_READ is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. |
CLOSE_ON_EOF | 1<<2 | If this is set, the file will close automatically when the end of the file is reached. |
REOPEN_ON_REWIND | 1<<3 | If this is set, the file will be reopened whenever Seek(0) occurs. If the file is already open and the seek occurs, it will happen naturally. (The file will only be reopened if it is closed for some reason.) |
Methods
init()
void init( in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags );
Parameters
file
- File to read from (must QI to
nsILocalFile
).
ioFlags
- File open flags listed in prio.h (see PR_Open documentation) or -1 to open the file in default mode (PR_RDONLY).
perm
- File mode bits listed in prio.h or -1 to use the default value (0).
behaviorFlags
- Flags specifying various behaviors of the class (see enumerations in the class).
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论