Struct xpcom::interfaces::nsIFileMetadata
[−]
[src]
#[repr(C)]pub struct nsIFileMetadata { /* fields omitted */ }
interface nsIFileMetadata : nsISupports
/**
* An interface that allows you to get some metadata like file size and
* file last modified time. These methods and attributes can throw
* NS_BASE_STREAM_WOULD_BLOCK in case the informations are not available yet.
* If this happens, consider the use of nsIAsyncFileMetadata.
*
* If using nsIAsyncFileMetadata, you should retrieve any data via this
* interface before taking any action that might consume the underlying stream.
* For example, once Available(), Read(), or nsIAsyncInputStream::AsyncWait()
* are invoked, these methods may return NS_BASE_STREAM_CLOSED. This will
* happen when using IPCBlobInputStream with an underlying file stream, for
* example.
*/
Methods
impl nsIFileMetadata
[src]
pub fn coerce<T: nsIFileMetadataCoerce>(&self) -> &T
[src]
Cast this nsIFileMetadata
to one of its base interfaces.
impl nsIFileMetadata
[src]
pub unsafe fn GetSize(&self, aSize: *mut int64_t) -> nsresult
[src]
/**
* File size in bytes.
*/
readonly attribute long long size;
pub unsafe fn GetLastModified(&self, aLastModified: *mut int64_t) -> nsresult
[src]
/**
* File last modified time in milliseconds from midnight (00:00:00),
* January 1, 1970 Greenwich Mean Time (GMT).
*/
readonly attribute long long lastModified;
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 nsIFileMetadata
[src]
const IID: nsIID
IID: nsIID = nsID(133593572, 38401, 19409, [181, 16, 205, 56, 82, 237, 184, 129])
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 nsIFileMetadata
[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 nsIFileMetadata
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.