Struct xpcom::interfaces::nsIFileStream
[−]
[src]
#[repr(C)]pub struct nsIFileStream { /* fields omitted */ }
interface nsIFileStream : nsISupports
/**
* A stream that allows you to read from a file or stream to a file.
*/
Methods
impl nsIFileStream
[src]
pub fn coerce<T: nsIFileStreamCoerce>(&self) -> &T
[src]
Cast this nsIFileStream
to one of its base interfaces.
impl nsIFileStream
[src]
pub const DEFER_OPEN: i64
DEFER_OPEN: i64 = 1
/**
* See the same constant in nsIFileInputStream. The deferred open will
* be performed when one of the following is called:
* - Seek
* - Tell
* - SetEOF
* - Available
* - Read
* - Flush
* - Write
* - GetSize
* - GetLastModified
*
* @note Using this flag results in the file not being opened
* during the call to Init. This means that any errors that might
* happen when this flag is not set would happen during the
* first read or write. The file is not locked when Init is called,
* so it might be deleted before we try to read from it and if the
* file is to be created, then it will not appear on the disk until
* the first write.
*/
pub unsafe fn Init(
&self,
file: *const nsIFile,
ioFlags: int32_t,
perm: int32_t,
behaviorFlags: int32_t
) -> nsresult
[src]
&self,
file: *const nsIFile,
ioFlags: int32_t,
perm: int32_t,
behaviorFlags: int32_t
) -> nsresult
/**
* @param file file to read from or stream to
* @param ioFlags file open flags listed in prio.h (see
* PR_Open documentation) or -1 to open the
* file in default mode (PR_RDWR).
* @param perm file mode bits listed in prio.h or -1 to
* use the default value (0)
* @param behaviorFlags flags specifying various behaviors of the class
* (see enumerations in the class)
*/
void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIFileStream
[src]
const IID: nsIID
IID: nsIID = nsID(2194628698, 33683, 17744, [131, 171, 67, 205, 85, 120, 224, 6])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIFileStream
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIFileStream
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.