The Trunk: System-tpr.1049.mcz

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

The Trunk: System-tpr.1049.mcz

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

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

Name: System-tpr.1049
Author: tpr
Time: 6 January 2019, 6:01:46.155189 pm
UUID: 8680d7e1-ee3a-47a3-95fb-eff9ce4505a3
Ancestors: System-tpr.1048

Actually comment FileServices. Goodness me, whatever next?

=============== Diff against System-tpr.1048 ===============

Item was changed:
  Object subclass: #FileServices
  instanceVariableNames: ''
  classVariableNames: 'FileReaderRegistry'
  poolDictionaries: ''
  category: 'System-FileRegistry'!
+
+ !FileServices commentStamp: 'tpr 1/6/2019 17:58' prior: 0!
+ FileServices is a registry of classes that provide file reading services - defined in the current implementation as classes implementing (directly, not inheriting) #fileReaderServicesForFile:suffix: on their class side.
+ Registered classes can provide services to read a file (specified by file name and suffix) or directory (specified by path name).
+ Mostly these services are used in file browser scenarios but see also ExternalDropHandler class>>#lookupServiceBasedHandler: for a different pattern!

Item was changed:
  ----- Method: FileServices class>>isReaderNamedRegistered: (in category 'accessing') -----
  isReaderNamedRegistered: aSymbol
+ "return if a given reader class has been registered. Note that this is on purpose that the argument is a symbol and not a class"
- "return if a given reader class has been registered. Note that this is on purpose that the argument is
- a symbol and not a class"
 
  ^ (self registeredFileReaderClasses collect: [:each | each name]) includes: aSymbol
  !

Item was changed:
  ----- Method: FileServices class>>suffixOf: (in category 'accessing') -----
  suffixOf: aName
+ "Answer the file extension of the given file, or an empty string should the file name be nil"
- "Answer the file extension of the given file"
  ^ aName
  ifNil:
  ['']
  ifNotNil:
  [(FileDirectory extensionFor: aName) asLowercase]!