Here is the method I used. Perhaps it will be help to someone...
One would call it when needing to convert the system root path to use when
you need the the unix-style path to be read by, for instance, the command
line.
e.g. $posixRoot := urlPath2Posix(join paths(get root))
It doesn't work on windows, just os x
method "urlPath2Posix"($path)
if ($path[[1]] = "/") // is it a system root path in url style? (i.e.
/HARDDRIVE/usr/local/www/)
$sysfolder := join paths(execute in 4d("SYSTEM FOLDER";*))
$bootvol := substring($sysfolder;1;position("/";$sysfolder;2))
if (substring($path;1;position("/";$path;2)) = $bootvol) //this is the boot
volume
$path := substring($path;position("/";$path;2);length($path))
else
$path := "/Volumes" + $path // this is a non-boot volume
end if
else
native to url path($path) // It is not a system root path, just return the
url style
end if
return($path)
end method
On Wed, Feb 18, 2009 at 5:20 PM, Aparajita Fishman <
[email protected]> wrote:
>> We're sending some path and file information to php for processing and
>> it is barfing when we send the url-style paths because they start with
>> the Volume name.
>
> In the v11 version paths will correctly include the /Volumes prefix when
> needed.
>
> Regards,
>
> Aparajita
> www.aparajitaworld.com
>
> "If you dare to fail, you are bound to succeed."
> - Sri Chinmoy | www.srichinmoy.org
>
>
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>
--
Thanks,
Michael Check
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/