[Gimp-developer] Selecting new constants for '(file-type file)'?
Greetings, all. 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)? Comments? Cheers! Kevin. (http://www.interlog.com/~kcozens/) Owner of Elecraft K2 #2172|What are we going to do today, Borg? E-mail:kcozens at interlog dot com|Same thing we always do, Pinkutus: Packet:[EMAIL PROTECTED]| Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Selecting new constants for '(file-type file)'?
FYI, Windows 2000 and XP both (partially) support variaties of hard and symbolic links under NTFS in certain scenarios. Then of course there are also the half-ass implemented Windows shortcut files (*.lnk). Finally, software also exists that allows Windows to access a *nix based file system where regular *nix style links might exist. Depending on your exact needs and purposes, I just thought those might be worth mentioning. Don't believe these impact your constants at all, but would hate to see link support omitted for Windows if only due to lack of familiarity with these features. s/KAM - Original Message - From: Kevin Cozens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 3:10 PM Subject: [Gimp-developer] Selecting new constants for '(file-type file)'? Greetings, all. 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)? Comments? Cheers! Kevin. (http://www.interlog.com/~kcozens/) Owner of Elecraft K2 #2172|What are we going to do today, Borg? E-mail:kcozens at interlog dot com|Same thing we always do, Pinkutus: Packet:[EMAIL PROTECTED]| Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Selecting new constants for '(file-type file)'?
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. ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Selecting new constants for '(file-type file)'?
On Thu, 2004-07-22 at 17:17, Markus Triska wrote: 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. I have decided to use FILE_TYPE_UNKNOWN as the default value if the other checks fail. This handles situations where the file might be (for example) a node, or the user doesn't have the permissions necessary to access the file. I just have to double check I have documented this in the function list for tsx. -- Cheers! Kevin. (http://www.interlog.com/~kcozens/) Owner of Elecraft K2 #2172|What are we going to do today, Borg? E-mail:kcozens at interlog dot com|Same thing we always do, Pinkutus: Packet:[EMAIL PROTECTED]| Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer