PCFilename.st
changeset 22718 d89e1ea4883f
parent 22391 189773f583e4
child 23507 e9ccd4d38962
equal deleted inserted replaced
22717:36be6a56c7d4 22718:d89e1ea4883f
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1997 by eXept Software AG
     4  COPYRIGHT (c) 1997 by eXept Software AG
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   613      (i.e. for directories, false is returned.)"
   615      (i.e. for directories, false is returned.)"
   614 
   616 
   615     |osName|
   617     |osName|
   616 
   618 
   617     osName := self osNameForAccess.
   619     osName := self osNameForAccess.
   618     (OperatingSystem getBinaryType:osName) notNil ifTrue:[
   620 
   619         ^ true.
   621     ((OperatingSystem isValidPath:osName)      
   620     ].
   622         and:[(OperatingSystem isDirectory:osName) not]) ifTrue:[
   621 
   623         (#('exe' 'com') includes:self suffix asLowercase) ifTrue:[
   622     (#('bat' 'cmd') includes:self suffix asLowercase) ifTrue:[
   624             "take care: getBinaryType is very slow on network shares!!"
   623         ^ (OperatingSystem isValidPath:osName)      
   625             ^ (OperatingSystem getBinaryType:osName) notNil
   624             and:[(OperatingSystem isDirectory:osName) not].
   626         ].
       
   627         ^ #('bat' 'cmd') includes:self suffix asLowercase.
   625     ].
   628     ].
   626     ^ false
   629     ^ false
   627 
   630 
   628     "
   631     "
   629         '%windir%\notepad.exe' asFilename isExecutableProgram
   632         '%windir%\notepad.exe' asFilename isExecutableProgram