MIMETypes.st
changeset 4088 bbf9b58f99c8
parent 4087 d9336080778d
child 4136 874a5465a78f
equal deleted inserted replaced
4087:d9336080778d 4088:bbf9b58f99c8
   315     TypeToInfoMapping at:'application/x-java-source' put:'Java source'.
   315     TypeToInfoMapping at:'application/x-java-source' put:'Java source'.
   316     TypeToInfoMapping at:'application/x-javascript' put:'JavaScript source'.
   316     TypeToInfoMapping at:'application/x-javascript' put:'JavaScript source'.
   317     TypeToInfoMapping at:'application/x-lisp-source' put:'Lisp source'.
   317     TypeToInfoMapping at:'application/x-lisp-source' put:'Lisp source'.
   318     TypeToInfoMapping at:'application/x-scheme-source' put:'Scheme source'.
   318     TypeToInfoMapping at:'application/x-scheme-source' put:'Scheme source'.
   319     TypeToInfoMapping at:'application/x-python-source' put:'Python source'.
   319     TypeToInfoMapping at:'application/x-python-source' put:'Python source'.
       
   320     TypeToInfoMapping at:'application/x-ruby-source' put:'Ruby source'.
   320 
   321 
   321     TypeToInfoMapping at:'application/x-make' put:'make rules'.
   322     TypeToInfoMapping at:'application/x-make' put:'make rules'.
   322     TypeToInfoMapping at:'application/binary' put:'binary object file'.
   323     TypeToInfoMapping at:'application/binary' put:'binary object file'.
   323 
   324 
   324     "
   325     "
  1639 
  1640 
  1640     "Modified: / 20-07-2012 / 17:36:31 / cg"
  1641     "Modified: / 20-07-2012 / 17:36:31 / cg"
  1641     "Modified (comment): / 09-02-2017 / 15:36:06 / stefan"
  1642     "Modified (comment): / 09-02-2017 / 15:36:06 / stefan"
  1642 ! !
  1643 ! !
  1643 
  1644 
       
  1645 !MIMETypes::MIMEType methodsFor:'converting'!
       
  1646 
       
  1647 asMimeType
       
  1648     ^ self
       
  1649 ! !
       
  1650 
  1644 !MIMETypes::MIMEType methodsFor:'queries'!
  1651 !MIMETypes::MIMEType methodsFor:'queries'!
  1645 
  1652 
  1646 fileTypeInfo
  1653 fileTypeInfo
  1647     ^ MIMETypes fileInfoForMimeType:self
  1654     ^ MIMETypes fileInfoForMimeType:self
  1648 
  1655 
  1683     "return true, if I represent a binary (non-text) type"
  1690     "return true, if I represent a binary (non-text) type"
  1684 
  1691 
  1685     ^ self isTextType not
  1692     ^ self isTextType not
  1686 !
  1693 !
  1687 
  1694 
       
  1695 isCHeaderType
       
  1696     "return true, if I represent a C header file type"
       
  1697 
       
  1698     ^ (self startsWith: 'application/x-c-header')
       
  1699 !
       
  1700 
       
  1701 isCPPSourceType
       
  1702     "return true, if I represent a C++ sourcecode type"
       
  1703 
       
  1704     ^ (self startsWith: 'application/x-cpp-source')
       
  1705 !
       
  1706 
       
  1707 isCSourceType
       
  1708     "return true, if I represent a C sourcecode type"
       
  1709 
       
  1710     ^ (self startsWith: 'application/x-c-source')
       
  1711 !
       
  1712 
  1688 isHtml
  1713 isHtml
  1689     <resource: #obsolete>
  1714     <resource: #obsolete>
  1690     "return true, if I represent the html text type"
  1715     "return true, if I represent the html text type"
  1691 
  1716 
  1692     ^ self isHtmlType
  1717     ^ self isHtmlType