Public Member Functions | Public Attributes

nsIFileInputStream Interface Reference

An input stream that allows you to read from a file. More...

import "nsIFileStreams.idl";

Inheritance diagram for nsIFileInputStream:
Collaboration diagram for nsIFileInputStream:

List of all members.

Public Member Functions

void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags)

Public Attributes

const long DELETE_ON_CLOSE = 1<<1
 If this is set, the file will be deleted by the time the stream is closed.
const long CLOSE_ON_EOF = 1<<2
 If this is set, the file will close automatically when the end of the file is reached.
const long REOPEN_ON_REWIND = 1<<3
 If this is set, the file will be reopened whenever Seek(0) occurs.

Detailed Description

An input stream that allows you to read from a file.


Member Function Documentation

void nsIFileInputStream::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)

Member Data Documentation

If this is set, the file will close automatically when the end of the file is reached.

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.

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.)


The documentation for this interface was generated from the following file: