4D v14.3

Convert path POSIX to system

Home

 
4D v14.3
Convert path POSIX to system

Convert path POSIX to system 


 

Convert path POSIX to system ( posixPath {; *} ) -> Function result 
Parameter Type   Description
posixPath  Text in POSIX pathname
Operator in Encoding option
Function result  Text in 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\truc 2.txt"
 $path:=Convert path POSIX to system("c:/docs/file%202.txt";*)
  `returns "c:\docs\truc 2.txt"

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 1107

 
HISTORY 

Created: 4D v12

 
SEE ALSO 

Convert path system to POSIX

 
TAGS 

posix

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)