The Trunk: Network-tpr.215.mcz

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

The Trunk: Network-tpr.215.mcz

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

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

Name: Network-tpr.215
Author: tpr
Time: 27 December 2017, 3:12:54.459587 pm
UUID: a1a4294c-1dbd-48a0-a122-2379f0311784
Ancestors: Network-eem.214

ServerDirectory shouldn't report '.' & '..' as dirctory names.
Add some methods for easier compaibility wth FileDirectory & FileChooserDialog

=============== Diff against Network-eem.214 ===============

Item was added:
+ ----- Method: FTPClient>>getWorkingDirectory (in category 'protocol') -----
+ getWorkingDirectory
+ | dirList |
+ self openPassiveDataConnection.
+ self sendCommand: 'PWD'.
+ dirList := self getData.
+ self checkResponse.
+ self checkResponse.
+ ^dirList
+ !

Item was changed:
  ----- Method: ServerDirectory>>directoryNames (in category 'file directory') -----
  directoryNames
  "Return a collection of names for the subdirectories of this directory."
  "(ServerDirectory serverNamed: 'UIUCArchive') directoryNames"
 
+ ^ (self entries select: [:entry | entry isDirectory and: [entry name ~= '.' and:[entry name ~= '..']]])
- ^ (self entries select: [:entry | entry isDirectory])
  collect: [:entry | entry name]
  !

Item was added:
+ ----- Method: ServerDirectory>>fileEntries (in category 'file directory') -----
+ fileEntries
+ "Return a collection of names for the files (but not directories) in this directory."
+ "(ServerDirectory serverNamed: 'UIUCArchive') fileEntries"
+
+ ^ self entries select: [:entry | entry isDirectory not]!

Item was added:
+ ----- Method: ServerDirectory>>hasFiles (in category 'testing') -----
+ hasFiles
+ "Return true if we find an entry that is a file, false otherwise"
+ "(ServerDirectory serverNamed: 'UIUCArchive') hasFiles"
+
+ ^ self entries anySatisfy: [:entry | entry isDirectory not]!

Item was added:
+ ----- Method: ServerDirectory>>hasSubDirectories (in category 'testing') -----
+ hasSubDirectories
+ "Return true if we find an entry that is a directory, false otherwise"
+ "(ServerDirectory serverNamed: 'UIUCArchive') hasSubDirectories"
+
+ ^ self entries anySatisfy: [:entry | entry isDirectory]!

Item was changed:
  ----- Method: ServerDirectory>>localName (in category 'file directory') -----
  localName
 
+ ^ServerDirectory servers keyAtIdentityValue: self ifAbsent:[
+ directory isEmpty ifTrue: [self error: 'no directory'].
+ self localNameFor: directory]!
- directory isEmpty ifTrue: [self error: 'no directory'].
- ^self localNameFor: directory!