'From Cuis 5.0 [latest update: #4567] on 11 April 2021 at 8:36:23 am'!

!String methodsFor: 'converting' stamp: 'KenD 4/4/2021 14:09:57'!
withoutDotSuffix
"
	'foo.svg' withoutDotSuffix.  	--> 'foo' 
	'barzot' withoutDotSuffix . 	--> 'barzot' 
	'foo.bar.baz' withoutDotSuffix. --> 'foo.bar' 
"
	^(self prefixAndSuffix: $. )
		ifNotNil: [ :pair  | pair first ]
		ifNil: [self ]! !


!ContentPack methodsFor: 'importing' stamp: 'KenD 4/4/2021 14:10:39'!
loadContentFrom: aDirectoryEntry
	"Load content in us, from files.
	Start with an empty instance!!"

	(self supportedFilesIn: aDirectoryEntry) do: [ :filename |			
		self flag: #todo. "Add hook for other media types here. Also consider renaming this method. --cbr"
		self at: filename name withoutDotSuffix
			put: (Form fromFileEntry: filename)
	].

	aDirectoryEntry directoryNames do: [ :i |
		self at: i put: (ContentPack new loadContentFrom: aDirectoryEntry / i)
	]! !


!ContentPack class methodsFor: 'configuration' stamp: 'KenD 4/4/2021 10:41:47'!
mapping

	^ {
		ColorForm -> #bmp .
		Form -> #png .
		SVGMainMorph -> #svg .
	}! !

