Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

nsIFile Interface Reference

import "nsIFile.idl";

Inheritance diagram for nsIFile:

nsISupports nsILocalFile

List of all members.

Detailed Description

This is the only correct cross-platform way to specify a file. Strings are not such a way. If you grew up on windows or unix, you may think they are. Welcome to reality.

All methods with string parameters have two forms. The preferred form operates on UCS-2 encoded characters strings. An alternate form operates on characters strings encoded in the "native" charset.

A string containing characters encoded in the native charset cannot be safely passed to javascript via xpconnect. Therefore, the "native methods" are not scriptable.


Definition at line 62 of file nsIFile.idl.

Public Member Functions

void append (in AString node)
void appendNative (in ACString node)
nsIFile clone ()
boolean contains (in nsIFile inFile, in boolean recur)
void copyTo (in nsIFile newParentDir, in AString newName)
void copyToFollowingLinks (in nsIFile newParentDir, in AString newName)
void copyToFollowingLinksNative (in nsIFile newParentDir, in ACString newName)
void CopyToNative (in nsIFile newParentDir, in ACString newName)
void create (in unsigned long type, in unsigned long permissions)
void createUnique (in unsigned long type, in unsigned long permissions)
boolean equals (in nsIFile inFile)
boolean exists ()
boolean isDirectory ()
boolean isExecutable ()
boolean isFile ()
boolean isHidden ()
boolean isReadable ()
boolean isSpecial ()
boolean isSymlink ()
boolean isWritable ()
void moveTo (in nsIFile newParentDir, in AString newName)
void moveToNative (in nsIFile newParentDir, in ACString newName)
void normalize ()
void remove (in boolean recursive)
 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

Public Attributes

const unsigned long DIRECTORY_TYPE = 1
readonly attribute
attribute PRInt64 fileSize
readonly attribute PRInt64 fileSizeOfLink
attribute PRInt64 lastModifiedTime
attribute PRInt64 lastModifiedTimeOfLink
attribute AString leafName
attribute ACString nativeLeafName
readonly attribute ACString nativePath
readonly attribute ACString nativeTarget
const unsigned long NORMAL_FILE_TYPE = 0
readonly attribute nsIFile parent
readonly attribute AString path
attribute unsigned long permissions
attribute unsigned long permissionsOfLink
readonly attribute AString target

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

Generated by  Doxygen 1.6.0   Back to index