Brodie Thiesfield wrote:
I initially understood that nsIFile was for syntactically valid, absolute paths only. Is this correct, or is it also valid to use nsIFile for relative path fragments, e.g.

    "file.txt" (file.txt in CWD for process)
    "foo/file.txt" (file.txt in CWD/foo for process)
    "c:file.txt" (file.txt in CWD for c:)

For instance, if a new instance of nsIFile is created (thus the contained path is empty), is it valid to do an Append()?

Brodie


None of the above example are guaranteed to work in all implementations of nsIFile.

The way we had it in mind was to create nsIFile from the nsIDirectoryService who knew about absolute file locations. Then, in a sense, nsIFile's were abstracted from knowing the absolute file paths -- a required for Mac OS Classic.

If you create a empty nsIFile, and Append, the nsIFile may or may not be valid -- the interface doesn't specify.

Doug
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to