The Trunk: Files-ul.178.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Files-ul.178.mcz

commits-2
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.178.mcz

==================== Summary ====================

Name: Files-ul.178
Author: ul
Time: 5 March 2018, 10:49:06.063658 pm
UUID: e612d91e-11fb-4479-b754-56fe59e06bec
Ancestors: Files-tpr.177

- only check once for #badDirectoryPath in FileDirectory>>directoryContentsFor:do:

=============== Diff against Files-tpr.177 ===============

Item was changed:
  ----- Method: FileDirectory>>directoryContentsFor:do: (in category 'private') -----
  directoryContentsFor: fullPath do: aBlock
  "Do aBlock for the files and directories in the directory with the given path. See primLookupEntryIn:index: for further details."
  "FileDirectory default directoryContentsFor: '' do: [ :each | Transcript show: each; cr ]"
 
+ | vmPath entryArray index |
+ vmPath := fullPath asVmPathName.
- | f entryArray index |
- f := fullPath asVmPathName.
  index := 1.
+ entryArray := (self primLookupEntryIn: vmPath index: index) ifNil: [ ^self ].
+ #badDirectoryPath == entryArray ifTrue: [
+ ^(InvalidDirectoryError pathName: fullPath) signal ].
+ [
+ aBlock value: (DirectoryEntry fromArray: entryArray directory: self) convertFromSystemName.
+ entryArray := (self primLookupEntryIn: vmPath index: (index := index + 1)) ifNil: [ ^self ] ] repeat!
- [(entryArray := self primLookupEntryIn: f index: index) == nil] whileFalse: [
- #badDirectoryPath == entryArray ifTrue: [
- ^(InvalidDirectoryError pathName: pathName) signal].
- index := index + 1.
- aBlock value: (DirectoryEntry fromArray: entryArray directory: self) convertFromSystemName]!