> Le 27 avr. 2018 à 19:29, Chip Scheide via 4D_Tech <[email protected]> a 
> écrit :
> 
> Test Path Name FAILS (file/folder does not exist) if given a POSIX 
> formatted path.

Normal behaviour, doc says "You can pass either a relative or absolute 
pathname, expressed in the syntax of the current system."  :-(
I like posix… For example I store paths inside resource folder and "complete" 
with this:

//Fs_resourcePath (posix_t {;checkIfExist_b) -> txt
//$0 current system absolute path
//$1 posix path relative to ressource folder
//   ex: "pictures/4statesbuttons/myButton.png"
//   ex: "pictures/4statesbuttons/"
//$2 optional : if passed and true, $0 will be empty
//   if folder or document doesn't exist
C_TEXT($0)
C_TEXT($1)
C_BOOLEAN($2)
$path_t:=Convert path system to POSIX(Get 4D folder(Current Resources 
folder))+$1
$path_t:=Convert path POSIX to system($path_t)
If (Count parameters>1)
        If ($2)  //must exist
                If (Test path name($path_t)<0)  //not a folder or a document
                        $path_t:=""
                End if
        End if
End if
$0:=$path_t
//_

-- 
Arnaud de Montard 



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to