The Trunk: Files-tpr.176.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-tpr.176.mcz

commits-2
tim Rowledge uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-tpr.176.mcz

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

Name: Files-tpr.176
Author: tpr
Time: 27 December 2017, 3:18:16.857836 pm
UUID: e942dde3-52d1-4865-bac5-783b7ba1b4ad
Ancestors: Files-nice.175

FileDirectory tests for has-files and has-subdirs.

=============== Diff against Files-nice.175 ===============

Item was changed:
  ----- Method: AcornFileDirectory class>>parentDirectoryNickname (in category 'platform specific') -----
  parentDirectoryNickname
  "Answer the nick-name for the parent directory (e.g. '..' on Unix and Windows).
+ Acorn chose to use the much more sensible ^; after all it points upwards..."
+ ^$^!
- Who knows what this is on Acorn?"
- ^nil!

Item was removed:
- ----- Method: FileDirectory class>>setDefaultDirectoryFrom: (in category 'system start up') -----
- setDefaultDirectoryFrom: imageName
- "Initialize the default directory to the directory containing the Squeak image file. This method is called when the image starts up."
-
- DirectoryClass := self activeDirectoryClass.
- DefaultDirectory := self on: (FilePath pathName: (self dirPathFor: imageName) isEncoded: true) asSqueakPathName.
- !

Item was added:
+ ----- Method: FileDirectory>>hasFiles (in category 'testing') -----
+ hasFiles
+ "Return true if we find an entry that is a file, false otherwise"
+ "FileDirectory default hasFiles"
+
+ self entriesDo: [ :entry |entry isDirectory ifFalse: [^true] ] .
+ ^false!

Item was added:
+ ----- Method: FileDirectory>>hasSubDirectories (in category 'testing') -----
+ hasSubDirectories
+ "Return true if we find an entry that is a directory, false otherwise"
+ "FileDirectory default hasSubDirectories"
+
+ self entriesDo: [ :entry |entry isDirectory ifTrue: [^true] ] .
+ ^false!

Item was changed:
  FileDirectory subclass: #UnixFileDirectory
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Files-Directories'!
 
+ !UnixFileDirectory commentStamp: 'tpr 12/26/2017 13:44' prior: 0!
- !UnixFileDirectory commentStamp: '<historical>' prior: 0!
  I represent a Unix FileDirectory.
+
+ It is worth noting that the various enumeration methods do *not* include the parent and local directory pseudo-names '.' and '..'. They are filtered out in the primitive that reads the directory entries.
  !