MIMETypes.st
changeset 3260 cefd4c99843e
parent 3253 32a605517d3d
child 3295 c430566c334c
equal deleted inserted replaced
3259:901d67809da0 3260:cefd4c99843e
  1279 ! !
  1279 ! !
  1280 
  1280 
  1281 !MIMETypes::MIMEType methodsFor:'queries'!
  1281 !MIMETypes::MIMEType methodsFor:'queries'!
  1282 
  1282 
  1283 isArchive
  1283 isArchive
       
  1284     <resource: #obsolete>
       
  1285     "return true, if I represent an archive type (such as zip or tar)"
       
  1286 
       
  1287     ^ self isArchiveType
       
  1288 !
       
  1289 
       
  1290 isArchiveType
  1284     "return true, if I represent an archive type (such as zip or tar)"
  1291     "return true, if I represent an archive type (such as zip or tar)"
  1285 
  1292 
  1286     |archivTypes|
  1293     |archivTypes|
  1287 
  1294 
  1288     archivTypes := MIMETypes applicationCompressorsAndArchiveTypeList.
  1295     archivTypes := MIMETypes applicationCompressorsAndArchiveTypeList.
  1291     ].
  1298     ].
  1292     ^ false
  1299     ^ false
  1293 !
  1300 !
  1294 
  1301 
  1295 isBinary
  1302 isBinary
       
  1303     <resource: #obsolete>
  1296     "return true, if I represent a binary (non-text) type"
  1304     "return true, if I represent a binary (non-text) type"
  1297 
  1305 
       
  1306     ^ self isBinaryType
       
  1307 !
       
  1308 
       
  1309 isBinaryType
       
  1310     "return true, if I represent a binary (non-text) type"
       
  1311 
  1298     ^ self isTextType not
  1312     ^ self isTextType not
  1299 !
  1313 !
  1300 
  1314 
  1301 isHtml
  1315 isHtml
       
  1316     <resource: #obsolete>
  1302     "return true, if I represent the html text type"
  1317     "return true, if I represent the html text type"
  1303 
  1318 
       
  1319     ^ self isHtmlType
       
  1320 !
       
  1321 
       
  1322 isHtmlType
       
  1323     "return true, if I represent the html text type"
       
  1324 
  1304     ^ (self = 'text/html')
  1325     ^ (self = 'text/html')
  1305 !
  1326 !
  1306 
  1327 
  1307 isImage
  1328 isImage
       
  1329     <resource: #obsolete>
  1308     "return true, if I represent an image type (such as gif or jpg)"
  1330     "return true, if I represent an image type (such as gif or jpg)"
  1309 
  1331 
       
  1332     ^ self isImageType
       
  1333 !
       
  1334 
       
  1335 isImageType
       
  1336     "return true, if I represent an image type (such as gif or jpg)"
       
  1337 
  1310     ^ (self startsWith:'image/')
  1338     ^ (self startsWith:'image/')
  1311 !
  1339 !
  1312 
  1340 
  1313 isPdf
  1341 isPdf
       
  1342     <resource: #obsolete>
  1314     "return true, if I represent the pdf type"
  1343     "return true, if I represent the pdf type"
  1315 
  1344 
       
  1345     ^ self isPdfType
       
  1346 !
       
  1347 
       
  1348 isPdfType
       
  1349     "return true, if I represent the pdf type"
       
  1350 
  1316     ^ (self = 'application/pdf')
  1351     ^ (self = 'application/pdf')
  1317 !
  1352 !
  1318 
  1353 
  1319 isSmalltalkSource
  1354 isSmalltalkSource
       
  1355     <resource: #obsolete>
       
  1356     "return true, if I represent the smalltalk sourcecode type"
       
  1357 
       
  1358     ^ self isSmalltalkSourceType
       
  1359 !
       
  1360 
       
  1361 isSmalltalkSourceType
  1320     "return true, if I represent the smalltalk sourcecode type"
  1362     "return true, if I represent the smalltalk sourcecode type"
  1321 
  1363 
  1322     ^ (self = 'application/x-smalltalk-source')
  1364     ^ (self = 'application/x-smalltalk-source')
  1323 !
  1365 !
  1324 
  1366 
  1327 
  1369 
  1328     ^ self startsWith:'text/'
  1370     ^ self startsWith:'text/'
  1329 !
  1371 !
  1330 
  1372 
  1331 isXml
  1373 isXml
       
  1374     <resource: #obsolete>
       
  1375     "return true, if I represent the xml text type"
       
  1376 
       
  1377     ^ self isXmlType
       
  1378 !
       
  1379 
       
  1380 isXmlType
  1332     "return true, if I represent the xml text type"
  1381     "return true, if I represent the xml text type"
  1333 
  1382 
  1334     ^ (self = 'text/xml')
  1383     ^ (self = 'text/xml')
  1335 !
  1384 !
  1336 
  1385 
  1343 ! !
  1392 ! !
  1344 
  1393 
  1345 !MIMETypes class methodsFor:'documentation'!
  1394 !MIMETypes class methodsFor:'documentation'!
  1346 
  1395 
  1347 version
  1396 version
  1348     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.130 2013-10-01 13:24:25 cg Exp $'
  1397     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.131 2013-12-07 10:28:34 cg Exp $'
  1349 !
  1398 !
  1350 
  1399 
  1351 version_CVS
  1400 version_CVS
  1352     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.130 2013-10-01 13:24:25 cg Exp $'
  1401     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.131 2013-12-07 10:28:34 cg Exp $'
  1353 ! !
  1402 ! !
  1354 
  1403 
  1355 
  1404 
  1356 MIMETypes initialize!
  1405 MIMETypes initialize!