Re: [racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread WarGrey Gyoudmon Ju
Maybe you can work with (namespace-mapped-symbols) and (namespace-variable-value), All field accessors are procedures with name starts with "struct-name-", no duplicates in the entire application. On Fri, Jul 22, 2016 at 3:59 AM, David Storrs wrote: > So there's no way

[racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread David Storrs
Okay. Thanks for the help, all. On Thursday, July 21, 2016, Jon Zeppieri wrote: > > > On Thu, Jul 21, 2016 at 3:59 PM, David Storrs > wrote: > >> So there's no way to query the interface of a

[racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread Jon Zeppieri
On Thu, Jul 21, 2016 at 3:59 PM, David Storrs wrote: > So there's no way to query the interface of a struct? > > > Not in general, no. -J -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group

[racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread David Storrs
So there's no way to query the interface of a struct? On Thursday, July 21, 2016, Jon Zeppieri wrote: > > > On Thu, Jul 21, 2016 at 2:44 PM, David Storrs > wrote: >> >> >> >> In a related

Re: [racket-users] How to differentiate between files and directories?

2016-07-21 Thread Jon Zeppieri
On Thu, Jul 21, 2016 at 2:44 PM, David Storrs wrote: > > > > In a related question, is there a way to introspect a struct to find > out what its fields are? > > If you mean the field values: yes, but only if the struct is transparent or prefab or if you have the proper

[racket-users] Re: How to differentiate between files and directories?

2016-07-21 Thread David Storrs
Hi Stephen, Yep, I saw file-exists?, thanks. Like I said, I don't want to check the disk twice (once when getting the list of paths with (in-directory), then again with file-exists?). I don't care if the file actually exists on disk, I care if this path is describing a file or a directory. I'm

Re: [racket-users] How to differentiate between files and directories?

2016-07-21 Thread Jon Zeppieri
On Thu, Jul 21, 2016 at 2:44 PM, David Storrs wrote: > > > I saw 'file-exists?' but I don't want to check the disk twice, I just > want to know what type it is. That information should have been > available when the path was constructed. > > Constructing a path doesn't

Re: [racket-users] How to differentiate between files and directories?

2016-07-21 Thread Stephen De Gabrielle
http://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28quote._~23~25kernel%29._file-exists~3f%29%29 in http://docs.racket-lang.org/reference/Filesystem.html (file-exists?

[racket-users] How to differentiate between files and directories?

2016-07-21 Thread David Storrs
Silly question: given a <#path>, how do I tell if it's to a file, directory, link, etc? I'd like to know this in general, although the proximate issue is that I would like to use (in-directory) to process all the files in a directory, but I need a way to ignore everything that isn't a file. I