--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MIMEType.st Tue Sep 10 15:50:32 2002 +0200
@@ -0,0 +1,89 @@
+"{ Package: 'stx:libview2' }"
+
+MIMETypes subclass:#MIMEType
+ instanceVariableNames:'fileName mimeType'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'System-Documentation'
+!
+
+
+!MIMEType class methodsFor:'instance creation'!
+
+for:fileName
+
+ | instance |
+
+ instance := self basicNew.
+ instance fileName:fileName.
+ ^ instance.
+! !
+
+!MIMEType methodsFor:'accessing'!
+
+fileName
+ "return the value of the instance variable 'fileName' (automatically generated)"
+
+ ^ fileName
+!
+
+fileName:something
+ "set the value of the instance variable 'fileName' (automatically generated)"
+
+ fileName := something.
+!
+
+mimeType
+ "return the value of the instance variable 'mimeType' (automatically generated)"
+
+ ^ mimeType
+!
+
+mimeTypeByContents
+ "return the value of the instance variable 'mimeTypeByContents' (automatically generated)"
+
+ ^ nil
+!
+
+mimeTypeBySuffix
+ "return the value of the instance variable 'mimeType' (automatically generated)"
+
+ mimeType isNil ifTrue:[
+ mimeType := self class mimeTypeForSuffix:(self fileName suffix).
+ ].
+ ^ mimeType
+! !
+
+!MIMEType methodsFor:'queries'!
+
+isArchiv
+
+ |archivTypes|
+
+ archivTypes := self class applicationComprAndArchiveTypeList.
+ archivTypes pairWiseDo:[: ext : type |
+ type = mimeType ifTrue:[ ^ true].
+ ].
+ ^ false
+!
+
+isHtml
+
+ ^ (mimeType = 'text/html')
+!
+
+isImage
+
+ ^ (mimeType startsWith:'image')
+!
+
+isPdf
+
+ ^ (mimeType = 'application/pdf')
+! !
+
+!MIMEType class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/MIMEType.st,v 1.1 2002-09-10 13:50:32 penk Exp $'
+! !