4D v13.4

Convert path POSIX to system

Home

 
4D v13.4
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

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D v12

 
SEE ALSO 

Convert path system to POSIX

 
TAGS 

posix***