# HG changeset patch # User ca # Date 1034264721 -7200 # Node ID 81e2d4217524473ba1c8884dc44776754e05bae8 # Parent 4b5a0721ec55e6263fb4eb450941f7150832de0d keep info instead of type alone diff -r 4b5a0721ec55 -r 81e2d4217524 DirectoryContents.st --- a/DirectoryContents.st Thu Oct 10 09:40:55 2002 +0200 +++ b/DirectoryContents.st Thu Oct 10 17:45:21 2002 +0200 @@ -22,7 +22,7 @@ ! Object subclass:#DirectoryContentsItem - instanceVariableNames:'type fileName' + instanceVariableNames:'info fileName' classVariableNames:'' poolDictionaries:'' privateIn:DirectoryContents @@ -439,11 +439,10 @@ mountInfo := mountPoints detect:[:mInfo | mInfo mountPointPath = file name] ifNone:nil. (mountInfo notNil and:[mountInfo isRemote]) ifTrue:[ - type := #remoteDirectory. + eachItem info:#remoteDirectory. ] ifFalse:[ - type := file type + eachItem info:file info. ]. - eachItem type:type. ]. ]. ! ! @@ -502,16 +501,18 @@ fileName := something. ! +info:something + "set the value of the instance variable 'type' (automatically generated)" + + info := something. +! + type "return the value of the instance variable 'type' (automatically generated)" - ^ type -! - -type:something - "set the value of the instance variable 'type' (automatically generated)" - - type := something. + info isSymbol ifTrue:[^ info]. + info isNil ifTrue:[^ info]. + ^ info type ! ! !DirectoryContents::DirectoryContentsItem methodsFor:'printing'! @@ -524,17 +525,20 @@ !DirectoryContents::DirectoryContentsItem methodsFor:'queries'! isDirectory - ^ (type == #directory or:[type == #remoteDirectory]) + |t| + + t := self type. + ^ (t == #directory or:[t == #remoteDirectory]) ! isRemoteDirectory - ^ type == #remoteDirectory + ^ info == #remoteDirectory ! ! !DirectoryContents class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic2/DirectoryContents.st,v 1.18 2002-10-10 07:33:55 penk Exp $' + ^ '$Header: /cvs/stx/stx/libbasic2/DirectoryContents.st,v 1.19 2002-10-10 15:45:21 ca Exp $' ! ! DirectoryContents initialize!