home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 840 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: grafix.xs4all.nl!john.hendrikx
  2. Date: Fri, 12 Jan 96 00:40:20 GMT+1
  3. Newsgroups: comp.sys.amiga.programmer
  4. Distribution: world
  5. Subject: Re: Protection bits
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=iso-8859-1
  8. Content-Transfer-Encoding: 8bit
  9. From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
  10. Message-ID: <john.hendrikx.45jy@grafix.xs4all.nl>
  11. Organization: Grafix Attack BBS Holland
  12.  
  13. In a message of 10 Jan 96 S.e. Morris wrote to All:
  14.  
  15.  >> Maybe the filesystem could be extended with somekind of hook which sets
  16.  >> the file-type correctly by looking at the first 512-bytes of the file
  17.  >> when it is first written/modified.  It would be an automatic FileID-ing
  18.  >> system which could be extended with new FileID's which the file system
  19.  >> could recognise and store as a FileID long in the fileinfoblock.
  20.  
  21.  >> When I come to think of it this doesn't seem all that hard to do and it
  22.  >> would probably not even slow down the filesystem.  I mean, taking a peek
  23.  >> at the first 512 bytes as it is written shouldn't be that hard.  The only
  24.  >> trouble is that 512 bytes might not be sufficient to make a FileID...
  25.  
  26.  >> This would make doing a directory with FileID's and with only IFF files
  27.  >> in them really fast, like on the MAC's (even though they use an even more
  28.  >> extensive, but unfortunately not always reliable system (you sometimes
  29.  >> need to set the FileType correctly yourself...)).
  30.  
  31.  
  32.  SeM> Why not store this infomation in the file's .info file?
  33.  
  34. Speed.  Doing an Examine() on a file is much faster than doing Open(), Read()
  35. and Close().
  36.  
  37.  SeM> This kind of auto-recognition of files isn't a feature you would expect
  38.  SeM> a command line shell to have --- it's a bit too high  level for that
  39.  SeM> IMHO.
  40.  
  41.  SeM> But the GUI is intended as a 'high-level' interface which goes out of
  42.  SeM> it's way to be friendly and helpful (supposedly!).  So storing a field
  43.  SeM> in the .info with the file type would be ideal.  The Workbench *has* to
  44.  SeM> load the .info files anyway --- so the speed descrease would be
  45.  SeM> practically non-existant!
  46.  
  47. Workbench?  Well, it could be used for Workbench as well, but slightly
  48. differently.  The Workbench could display special icons for files which don't
  49. have a .info file based on the FileID LONG stored in the FileHeader.
  50.  
  51. Grtz John
  52.  
  53. -----------------------------------------------------------------------
  54.  John.Hendrikx@grafix.xs4all.nl   TextDemo/FastView/Etc... development
  55. -----------------------------------------------------------------------
  56. -- Via Xenolink 1.981, XenolinkUUCP 1.1
  57.