#FEATURE by cg
class: MIMETypes class
changed: #initializeFileInfoMappings
class: MIMETypes::MIMEType
added:
#asMimeType
#isCHeaderType
#isCPPSourceType
#isCSourceType
--- a/MIMETypes.st Fri May 11 13:09:47 2018 +0200
+++ b/MIMETypes.st Sat May 12 14:23:45 2018 +0200
@@ -317,6 +317,7 @@
TypeToInfoMapping at:'application/x-lisp-source' put:'Lisp source'.
TypeToInfoMapping at:'application/x-scheme-source' put:'Scheme source'.
TypeToInfoMapping at:'application/x-python-source' put:'Python source'.
+ TypeToInfoMapping at:'application/x-ruby-source' put:'Ruby source'.
TypeToInfoMapping at:'application/x-make' put:'make rules'.
TypeToInfoMapping at:'application/binary' put:'binary object file'.
@@ -1641,6 +1642,12 @@
"Modified (comment): / 09-02-2017 / 15:36:06 / stefan"
! !
+!MIMETypes::MIMEType methodsFor:'converting'!
+
+asMimeType
+ ^ self
+! !
+
!MIMETypes::MIMEType methodsFor:'queries'!
fileTypeInfo
@@ -1685,6 +1692,24 @@
^ self isTextType not
!
+isCHeaderType
+ "return true, if I represent a C header file type"
+
+ ^ (self startsWith: 'application/x-c-header')
+!
+
+isCPPSourceType
+ "return true, if I represent a C++ sourcecode type"
+
+ ^ (self startsWith: 'application/x-cpp-source')
+!
+
+isCSourceType
+ "return true, if I represent a C sourcecode type"
+
+ ^ (self startsWith: 'application/x-c-source')
+!
+
isHtml
<resource: #obsolete>
"return true, if I represent the html text type"