sonar

Scan files at memory bandwidth speed.
Log | Files | Refs

scan.odin (780B)


      1 /*
      2 Package scan holds the seam between the readers that find files and the tree the UI
      3 reads.
      4 
      5 A reader knows how to discover files on one kind of filesystem. It does not get to
      6 decide how they are recorded, because everything above this line has to work the same
      7 whichever reader ran. So the shared parts live here: resolving what the user asked
      8 for, choosing a reader for it, and the tree they all write into.
      9 
     10 Dispatch is a switch at the one place a reader is chosen, not an interface. The set
     11 of readers is known when the program is built, so nothing is gained by describing it
     12 to the compiler at runtime.
     13 */
     14 package scan
     15 
     16 Error :: enum {
     17 	None,
     18 	Target_Not_Found,
     19 	Access_Denied, // the volume exists but this process may not read it
     20 	Out_Of_Memory,
     21 	Unsupported_Platform,
     22 }