This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Convert path POSIX to system
|
Convert path POSIX to system ( posixPath {; *} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
posixPath | Text |
![]() |
POSIX pathname | |||||
* | Operator |
![]() |
Encoding option | |||||
Function result | Text |
![]() |
Pathname expressed in system syntax | |||||
The Convert path POSIX to system command converts a pathname expressed with the POSIX (Unix) syntax into a pathname expressed with the system syntax.
Pass the complete pathname of a file or folder in the posixPath parameter, expressed with the POSIX syntax. This path must be absolute (it must begin with the "/" character). You must pass a disk path; it is not possible to pass a network path (beginning, for example, with ftp://ftp.mysite.fr).
The command returns the complete pathname of the file or folder expressed in the current system syntax.
The optional * parameters can be used to indicate whether the posixPath parameter is encoded. If this is the case, you must pass this parameter, otherwise the conversion will not be valid. The command returns the pathname without encoding.
Examples under Mac OS:
$path:=Convert path POSIX to system("/Volumes/machd/file 2.txt")
//returns "machd:file 2.txt"
$path:=Convert path POSIX to system("/Volumes/machd/file%202.txt";*)
//returns "machd:file 2.txt"
$path:=Convert path POSIX to system("/file 2.txt")
//returns "machd:file 2.txt" if machd is the startup disk
Examples under Windows:
$path:=Convert path POSIX to system("c:/docs/file 2.txt")
//returns "c:\\docs\\file 2.txt"
$path:=Convert path POSIX to system("c:/docs/file%202.txt";*)
//returns "c:\\docs\\file 2.txt"
Product: 4D
Theme: System Documents
Number:
1107
Created: 4D v12
posix
4D Language Reference ( 4D v20 R7)