Hi Mathias, On Thu, Mar 25, 2010 at 1:33 PM, Mathias Bauer <[email protected]> wrote:
> Madhur Kashyap wrote: > > > Mathias and Irne > > > > Thanks for your responses. The home folder concept is useful for setting > a > > current working directory (linux). > > > > Although my purpose was little different. I found that help in Andrew > > Pitonyak's quick reference. > > > > OO Basic supports an API getPathSeparator() which returns "/" or "\" > > depending upon what OS is used. So, my purpose has been temporarily > solved. > > That's completely unnecessary if you use URLs instead of path names. As > most API calls in OOo use URLs anyway you also save your don't need to > convert your file names when you want to use them in API calls. > > The biggest problem still is "sRootDir". You have to know this and so > your idea to write OS agnostic code is only possible with using a "root > dir" that is accessible through one of OOo's path variable, like e.g. > the HOME folder. If you are not able to identify the operating system > you are working on, how can you guess "sRootDir" in the correct > notation? OTOH, if you know "sRootDir", you also know at least if your > OS has a Windows type or a Unix type file name notation. > > Actually in my description I gave, I did not tell that I also need to execute some shell commands with path description. So, does "shell" or "execute" commands accept URLs ? I haven't tried that but my gut feel is it would not. So, would the conversion command take care of path separator? -- Regards Madhur Kashyap
