FindFileApplication.st
changeset 13773 b4eb885ea9f0
parent 12778 b7c50fd7cd7a
child 13920 1929484021d8
equal deleted inserted replaced
13772:c33edfc1abcc 13773:b4eb885ea9f0
  1477 
  1477 
  1478                         "/ string search ...
  1478                         "/ string search ...
  1479                         contentsMatches := true.
  1479                         contentsMatches := true.
  1480                         (f exists and:[f isReadable]) ifFalse:[
  1480                         (f exists and:[f isReadable]) ifFalse:[
  1481                             resultList add: (('*** ' , f pathName , ' skipped - unreadable or bad symbolic link ***') colorizeAllWith:(Color red darkened)).
  1481                             resultList add: (('*** ' , f pathName , ' skipped - unreadable or bad symbolic link ***') colorizeAllWith:(Color red darkened)).
       
  1482                             contentsMatches := false.
  1482                         ] ifTrue:[
  1483                         ] ifTrue:[
  1483                             hugeFile := f fileSize > (4024*1024).
  1484                             hugeFile := f fileSize > (4024*1024).
  1484                             bigFile := f fileSize > (512*1024).
  1485                             bigFile := f fileSize > (512*1024).
  1485 
  1486 
  1486                             hugeFile ifTrue:[
  1487                             hugeFile ifTrue:[
  1487                                 resultList add: (('*** ' , f pathName , ' skipped - too large ***') colorizeAllWith:(Color red darkened)).
  1488                                 resultList add: (('*** ' , f pathName , ' skipped - too large ***') colorizeAllWith:(Color red darkened)).
       
  1489                                 contentsMatches := false.
  1488                             ] ifFalse:[
  1490                             ] ifFalse:[
  1489                                 Stream lineTooLongErrorSignal handle:[:ex |
  1491                                 Stream lineTooLongErrorSignal handle:[:ex |
  1490                                     |cont|
  1492                                     |cont|
  1491 
  1493 
  1492 "/                                    "/ this typically happens, when a binary file is read linewise ...
  1494 "/                                    "/ this typically happens, when a binary file is read linewise ...
  1493                                     resultList add: (('*** ' , f pathName , ' skipped - binary/long line ***') colorizeAllWith:(Color red darkened)).
  1495                                     resultList add: (('*** ' , f pathName , ' skipped - binary/long line ***') colorizeAllWith:(Color red darkened)).
       
  1496                                     contentsMatches := false.
  1494                                 ] do:[
  1497                                 ] do:[
  1495                                     bigFile ifTrue:[
  1498                                     bigFile ifTrue:[
  1496                                         Stream lineTooLongErrorSignal handle:[:ex |
  1499                                         Stream lineTooLongErrorSignal handle:[:ex |
  1497                                             resultList add: (('*** ' , f pathName , ' skipped - too large ***') colorizeAllWith:(Color red darkened)).
  1500                                             resultList add: (('*** ' , f pathName , ' skipped - too large ***') colorizeAllWith:(Color red darkened)).
       
  1501                                             contentsMatches := false.
  1498                                         ] do:[
  1502                                         ] do:[
  1499                                             contentsMatches := false.
  1503                                             contentsMatches := false.
  1500                                             (check == easyCheck 
  1504                                             (check == easyCheck 
  1501                                             and:[ f size < (128*1024) ]) ifTrue:[
  1505                                             and:[ f size < (128*1024) ]) ifTrue:[
  1502                                                 check notNil ifTrue:[
  1506                                                 check notNil ifTrue:[
  1842 ! !
  1846 ! !
  1843 
  1847 
  1844 !FindFileApplication class methodsFor:'documentation'!
  1848 !FindFileApplication class methodsFor:'documentation'!
  1845 
  1849 
  1846 version
  1850 version
  1847     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.109 2013-05-28 10:34:29 cg Exp $'
  1851     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.110 2014-01-22 16:24:53 cg Exp $'
  1848 !
  1852 !
  1849 
  1853 
  1850 version_CVS
  1854 version_CVS
  1851     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.109 2013-05-28 10:34:29 cg Exp $'
  1855     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.110 2014-01-22 16:24:53 cg Exp $'
  1852 ! !
  1856 ! !
  1853 
  1857