Re: [Gimp-developer] Selecting new constants for '(file-type file)'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> I want to define some constants related to file type for use in Tiny-Fu. My
> current thinking is to use FILE_TYPE_FILE (0), FILE_TYPE_DIR (1), and
> FILE_TYPE_LINK (2). The last one being for *nix systems only. Are
> there  any other file types that should be handled (ie. nodes on *nix
> systems)?

Maybe I have not given this enough thought, but I would opt for 
FILE_TYPE_NONEXISTANT (although this can hardly be called a "file" type) so 
there is some well-defined behaviour if the path to check points nowhere. 
Also, what happens with access permissions ("not readable")? The call should 
be well-defined in this case, too, so maybe (to cover both cases), there 
should be some "FILE_TYPE_ERROR" and other predicates to check for 
existence/permission.

Markus.

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux