Jason Bassford wrote:
> The value of "archive" holds the full path to the temporary location
> of an installing XPI.  So, in my case, if I run "test.xpi" I'd get:
> 
> c:\Temp\test.xpi
> 
> But how to I get JUST the value of the folder?  (I need to strip out
> the filename itself and leave just the folder or, in other words,
> "c:\Temp".)

Actually archive holds a fileobject, but in a string context it gets
converted as needed. Use your favorite javascript string functions to
truncate from the last slash forward. (It'd be really convenient if the
filespecobjects had a parent() method, but they don't.)

But unless you really want the archive itself, you might be better off
getting the system's idea of the temporary location directly:
getFolder("Temporary")

-Dan Veditz


Reply via email to