Eliot Miranda uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-eem.131.mcz
==================== Summary ====================
Name: Network-eem.131 Author: eem Time: 28 June 2012, 8:58:07.094 am UUID: df89a3e5-a9c1-46d0-a2fa-39d72e105cda Ancestors: Network-dtl.130
Add some Croquet URI manipulation routines used by the Cog VMMaker to the base Network package.
=============== Diff against Network-dtl.130 ===============
Item was added: + ----- Method: DosFileDirectory>>uriPathToPlatformPath: (in category '*network-uri') ----- + uriPathToPlatformPath: aString + "Convert a URI path (w/ forward slashes) into a platform path if necessary. + Also make sure we deal properly with shares vs. drives" + | parts | + parts := aString findTokens: '/'. + (parts first endsWith: ':') ifTrue:[ + "it's a drive - compose c:\foo\bar" + ^aString allButFirst copyReplaceAll: '/' with: '' + ] ifFalse:[ + "it's a share - compose \share\foo\bar" + ^'', (aString copyReplaceAll: '/' with: '') + ].!
Item was added: + ----- Method: FileDirectory>>pathFromURI: (in category '*network-uri') ----- + pathFromURI: aString + | path | + aString class == Array ifTrue:["bullet-proofing" + ^FileDirectory pathFrom: {self pathName}, aString]. + "To support paths like foo/bar/user#2.doc, use #allButScheme instead of #path" + path := (self uri resolveRelativeURI: aString) allButScheme. + ^self uriPathToPlatformPath: path + !
Item was added: + ----- Method: FileDirectory>>uriPathToPlatformPath: (in category '*network-uri') ----- + uriPathToPlatformPath: aString + "Convert a URI path (w/ forward slashes) into a platform path if necessary" + ^aString!
Item was added: + ----- Method: HierarchicalURI>>allButScheme (in category 'printing') ----- + allButScheme + "Answer the entire url except its scheme" + + ^String streamContents:[:s| + authority ifNotNil:[self authority printOn: s]. + s nextPutAll: super allButScheme. + query ifNotNil:[s nextPutAll: query]. + ].!
Item was added: + ----- Method: URI>>allButScheme (in category 'printing') ----- + allButScheme + "Answer the entire url except its scheme" + + ^String streamContents:[:s| + s nextPutAll: schemeSpecificPart. + fragment ifNotNil: [ + s nextPut: $# . + s nextPutAll: self fragment] + ].!
packages@lists.squeakfoundation.org