1961 Someone (which is usually some codeView) is notified of errors." |
1961 Someone (which is usually some codeView) is notified of errors." |
1962 |
1962 |
1963 ^ self fileInNotifying:notifiedLoader passChunk:passChunk inDirectory:(self fileName directory). |
1963 ^ self fileInNotifying:notifiedLoader passChunk:passChunk inDirectory:(self fileName directory). |
1964 |
1964 |
1965 "Modified: / 16-02-2017 / 11:28:21 / stefan" |
1965 "Modified: / 16-02-2017 / 11:28:21 / stefan" |
1966 ! |
|
1967 |
|
1968 fileInNotifying:notifiedLoader passChunk:passChunk inDirectory:aDirectory |
|
1969 "central method to file in from the receiver, i.e. read chunks and evaluate them - |
|
1970 return the value of the last chunk. |
|
1971 Someone (which is usually some codeView) is notified of errors. |
|
1972 Add aDirectory to the search path for classes, while performing the fileIn." |
|
1973 |
|
1974 |oldPath val thisDirectory thisDirectoryPathName| |
|
1975 |
|
1976 thisDirectory := aDirectory asFilename. |
|
1977 thisDirectoryPathName := thisDirectory pathName. |
|
1978 oldPath := Smalltalk systemPath. |
|
1979 |
|
1980 [ |
|
1981 Smalltalk systemPath:(oldPath copy addFirst:thisDirectoryPathName; yourself). |
|
1982 self class currentFileInDirectoryQuerySignal answer:thisDirectory do:[ |
|
1983 self class currentSourceContainerQuery answer:self do:[ |
|
1984 val := self basicFileInNotifying:notifiedLoader passChunk:passChunk. |
|
1985 ]. |
|
1986 ] |
|
1987 ] ensure:[ |
|
1988 "take care, someone could have changed SystemPath during fileIn!!" |
|
1989 (Smalltalk systemPath copyFrom:2) = oldPath ifTrue:[ |
|
1990 Smalltalk systemPath:oldPath. |
|
1991 ] ifFalse:[ |
|
1992 (oldPath includes:thisDirectoryPathName) ifFalse:[ |
|
1993 Smalltalk systemPath remove:thisDirectoryPathName ifAbsent:[]. |
|
1994 Smalltalk flushPathCaches. |
|
1995 ]. |
|
1996 ]. |
|
1997 ]. |
|
1998 ^ val |
|
1999 |
|
2000 "Modified: / 23-10-2006 / 16:35:10 / cg" |
|
2001 ! ! |
1966 ! ! |
2002 |
1967 |
2003 !FileStream methodsFor:'queries'! |
1968 !FileStream methodsFor:'queries'! |
2004 |
1969 |
2005 collectionSize |
1970 collectionSize |