Filename.st
changeset 8660 a14239ed6ac3
parent 8535 c108815bc276
child 8668 40e71fa11ff7
equal deleted inserted replaced
8659:d8f5821a6d6d 8660:a14239ed6ac3
   667     |tempDir|
   667     |tempDir|
   668 
   668 
   669     #('STX_TMPDIR' 'ST_TMPDIR' 'TMPDIR' 'TEMPDIR' 'TEMP' 'TMP') do:[:envVar |
   669     #('STX_TMPDIR' 'ST_TMPDIR' 'TMPDIR' 'TEMPDIR' 'TEMP' 'TMP') do:[:envVar |
   670         tempDir isNil ifTrue:[
   670         tempDir isNil ifTrue:[
   671             tempDir := OperatingSystem getEnvironment:envVar.
   671             tempDir := OperatingSystem getEnvironment:envVar.
       
   672             tempDir notNil ifTrue:[
       
   673                 tempDir asFilename exists ifFalse:[
       
   674                     tempDir := nil.
       
   675                 ].
       
   676             ].
   672         ].
   677         ].
   673     ].
   678     ].
   674     tempDir isNil ifTrue:[
   679     tempDir isNil ifTrue:[
   675         tempDir := self defaultTempDirectoryName
   680         tempDir := self defaultTempDirectoryName
   676     ].
   681     ].
   677     ^ self named:tempDir
   682     ^ self named:tempDir
   678 
   683 
   679     "
   684     "
   680      Filename tempDirectory           
   685      Filename tempDirectory           
   681      Filename tempDirectory pathName   
   686      Filename tempDirectory pathName   
   682      Filename tempDirectory exists   
   687      Filename tempDirectory exists    
   683      Filename tempDirectory isWritable   
   688      Filename tempDirectory isWritable   
   684      (Filename tempDirectory construct:'foo') makeDirectory   
   689      (Filename tempDirectory construct:'foo') makeDirectory   
       
   690      (Filename tempDirectory construct:'foo') remove   
   685     "
   691     "
   686 
   692 
   687     "Modified: 7.9.1995 / 10:48:31 / claus"
   693     "Modified: 7.9.1995 / 10:48:31 / claus"
   688     "Created: 7.3.1996 / 14:51:18 / cg"
   694     "Created: 7.3.1996 / 14:51:18 / cg"
   689     "Modified: 8.9.1997 / 00:08:11 / cg"
   695     "Modified: 8.9.1997 / 00:08:11 / cg"
  5029 ! !
  5035 ! !
  5030 
  5036 
  5031 !Filename class methodsFor:'documentation'!
  5037 !Filename class methodsFor:'documentation'!
  5032 
  5038 
  5033 version
  5039 version
  5034     ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.282 2004-09-10 13:16:26 cg Exp $'
  5040     ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.283 2004-12-15 10:30:57 penk Exp $'
  5035 ! !
  5041 ! !
  5036 
  5042 
  5037 Filename initialize!
  5043 Filename initialize!