If i interpreted Dougt's post from xpcom ng correctly i think we are 
going to have something like this:

------------------------------------------


#include "nsISupports.idl"
interface nsISimpleEnumerator;

[scriptable, uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)]
interface nsIFile : nsISupports {

     const unsigned long NORMAL_FILE_TYPE = 0;
     const unsigned long DIRECTORY_TYPE   = 1;

     void append(in wstring node);

     attribute wstring       leafName;
     attribute unsigned long permissions;
     attribute wstring       URL;
     attribute string        persistentDescriptor;
     attribute PRInt64       lastModificationDate;
     attribute PRInt64       fileSize;

     // possible addition
     attribute wstring owner;

     readonly attribute wstring target;
     readonly attribute wstring path;

     void normalize();

     boolean exists();
     boolean isWritable();
     boolean isReadable();
     boolean isExecutable();
     boolean isHidden();
     boolean isDirectory();
     boolean isFile();
     boolean isSymlink();
     boolean isSpecial();

     attribute PRBool followLinks;
};

[scriptable, uuid(55c5487e-70d4-46b2-a710-483d3c6d7b4b)]
interface nsIFileSystem : nsIFile {

     void create(in nsIFile file, in unsigned long type, in unsigned 
long permissions);

     void createUnique(in nsIFile file, in wstring suggestedName, in 
unsigned long type,
                     in unsigned long permissions);

     void copyTo(in nsIFile source, in nsIFile newParentDir, in wstring 
newName);
     void moveTo(in nsIFile source, in nsIFile newParentDir, in wstring 
newName);

     void remove(in nsIFile file, in boolean recursive);

     nsIFile clone(in nsIFile fileToClone);
     boolean equals(in nsIFile origFile, in nsIFile inFile);
     boolean contains(in nsIFile source, in nsIFile inFile, in boolean 
recur);
     nsIFile getParent(in nsIFile source);
     nsISimpleEnumerator getDirectoryEntries(in nsIFile source);

     // not sure about these
     [noscript] PRLibraryStar load(in nsIFile file);
     [noscript] PRFileDescStar openNSPRFileDesc(in long flags, in long 
mode);
     [noscript] FILE           openANSIFileDesc(in string mode);

     PRInt64 diskSpaceAvailable(in nsIFile file);

};

[scriptable, uuid(aa610f20-a889-11d3-8c81-000064657374)]
interface nsILocalFile : nsIFile {

     void initWithPath(in wstring filePath, in boolean followLinks);


};



Reply via email to