[Project_owners] How to get the current directory

Didier Ernotte didier at ernotte.com
Tue Nov 7 15:56:47 PST 2006


hi,

I have a xul page (not an extension), and I need to read a file which is located in the same directory as the xul file. The problem I have is that the initWithPath on nsILocalFile needs an absolute path, and I don't want to hardcode the path in the xul file. How can I get the current directory (directory of the xul file) ? There is a lot of dir that I can access : Profile dir, home dir, mozilla dir, ... but nothing for the current dir.
Thanks

Didier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20061107/eb878e35/attachment.html 


More information about the Project_owners mailing list