nsIFileOutputStream 编辑
netwerk/base/public/nsIFileStreams.idl
Scriptable This interface is an output stream that lets you stream to a file. Inherits from: nsIOutputStream
Last changed in Gecko 1.7Method overview
void init(in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); |
Constants
Behavior flag constants
Constant | Value | Description |
DEFER_OPEN | 1<<0 | See the same constant in nsIFileInputStream . The deferred open will be performed when one of the following is called:
init() . This means that any errors that might happen when this flag is not set would happen during the first write, and if the file is to be created, it will not appear on the disk until the first write. |
Methods
init()
void init( in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags );
Parameters
file
- File to write to (must QI to
nsILocalFile
) ioFlags
- File open flags listed are listed in the PR_Open() documentation. Use
-1
to open the file in default mode (PR_WRONLY
|PR_CREATE_FILE
|PR_TRUNCATE
). perm
- File mode bits are described in the PR_Open documentation. If set to
-1
the default permissions (0664) will be used. behaviorFlags
- Flags specifying various behaviors of the class; see Behavior flag constants above.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论