'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 25 September 2008 at 9:01:25 am'!

!FileStream class methodsFor: 'directory services' stamp: 'jmv 9/23/2008 11:00'!
creationAndModificationTimeOf: filename

	| stream entry answer |
	answer _ nil.
	stream _ self oldFileOrNoneNamed: filename.
	stream notNil ifTrue: [
		[
			entry _ stream directoryEntry.
			answer _ Array
				with: entry creationTime
				with: entry modificationTime.
		] ensure: [stream close]].
	^answer! !


!Form methodsFor: 'scaling, rotation' stamp: 'jmv 9/23/2008 10:14'!
magnifyBy: scale 
	"Answer a Form created as a scaling of the receiver.
	Scale may be a Float, and may be greater or less than 1.0."

	^ self magnify: self boundingBox by: scale
			smoothing: (scale magnitude < 1 ifTrue: [2] ifFalse: [1])! !


!Number methodsFor: 'mathematical functions' stamp: 'jmv 9/23/2008 10:13'!
magnitude
	^self abs! !


!Point methodsFor: 'polar coordinates' stamp: 'jmv 9/23/2008 10:14'!
magnitude
	^self r! !


!String methodsFor: 'converting' stamp: 'jmv 9/23/2008 09:58'!
periodPrefixAndSuffix
	| prefix suffix |
	prefix _ self sansPeriodSuffix.
	suffix _ self copyFrom: prefix size+1 to: self size.
	^Array with: prefix with: suffix! !

!String methodsFor: 'converting' stamp: 'jmv 9/23/2008 10:06'!
sansPeriodSuffix
	"Return a copy of the receiver up to, but not including, the first period.  If the receiver's *first* character is a period, then just return the entire receiver. "

	| likely |
	likely _ self copyUpToLast: $..
	^ likely size == 0
		ifTrue:	[self]
		ifFalse:	[likely]! !

