equal
deleted
inserted
replaced
6041 |
6041 |
6042 |f| |
6042 |f| |
6043 |
6043 |
6044 ((f := aFileName asFilename) isAbsolute |
6044 ((f := aFileName asFilename) isAbsolute |
6045 or:[f isExplicitRelative]) ifTrue:[ |
6045 or:[f isExplicitRelative]) ifTrue:[ |
6046 "/ |
6046 "/ |
6047 "/ dont use path for absolute or explicit .-relative file names |
6047 "/ dont use path for absolute or explicit .-relative file names |
6048 "/ |
6048 "/ |
6049 ^ aFileName |
6049 ^ aFileName |
6050 ]. |
6050 ]. |
6051 |
6051 |
6052 aPath notNil ifTrue:[ |
6052 aPath notNil ifTrue:[ |
6053 aPath do:[:dirName | |
6053 aPath do:[:dirName | |
6054 |realName dir| |
6054 |realName dir| |
6055 |
6055 |
6056 dir := dirName asFilename. |
6056 dir := dirName asFilename. |
6057 aDirName notNil ifTrue:[ |
6057 aDirName notNil ifTrue:[ |
6058 realName := (dir construct:aDirName) construct:aFileName. |
6058 realName := (dir construct:aDirName) construct:aFileName. |
6059 ] ifFalse:[ |
6059 ] ifFalse:[ |
6060 realName := dir construct:aFileName. |
6060 realName := dir construct:aFileName. |
6061 ]. |
6061 ]. |
6062 (realName isReadable) ifTrue:[ |
6062 (realName isReadable) ifTrue:[ |
6063 ^ realName name |
6063 ^ realName name |
6064 ] |
6064 ] |
6065 ]. |
6065 ]. |
6066 ]. |
6066 ]. |
6067 |
6067 |
|
6068 "/ not needed - executing dir is always in SearchPath |
|
6069 "/ realName := Filename currentDirectory construct:aFileName. |
|
6070 "/ (realName isReadable) ifTrue:[ |
|
6071 "/ ^ realName name |
|
6072 "/ ]. |
6068 ^ nil. |
6073 ^ nil. |
6069 |
6074 |
6070 "Modified: / 29.4.1999 / 15:06:43 / cg" |
6075 "Modified: / 29.4.1999 / 15:06:43 / cg" |
6071 ! |
6076 ! |
6072 |
6077 |
7084 ! ! |
7089 ! ! |
7085 |
7090 |
7086 !Smalltalk class methodsFor:'documentation'! |
7091 !Smalltalk class methodsFor:'documentation'! |
7087 |
7092 |
7088 version |
7093 version |
7089 ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.849 2008-07-23 12:09:42 cg Exp $' |
7094 ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.850 2008-08-05 13:26:34 cg Exp $' |
7090 ! ! |
7095 ! ! |