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?
<http://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28quote._~23~25kernel%29._file-exists~3f%29%29>
 path) → boolean?
<http://docs.racket-lang.org/reference/booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29>
(link-exists?
<http://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28quote._~23~25kernel%29._link-exists~3f%29%29>
 path) → boolean?
<http://docs.racket-lang.org/reference/booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29>

(directory-exists?
<http://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28quote._~23~25kernel%29._directory-exists~3f%29%29>
 path) → boolean?
<http://docs.racket-lang.org/reference/booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29>

  path : path-string?
<http://docs.racket-lang.org/reference/Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29>

Returns #t if path refers to a directory, #f otherwise.


On Thu, Jul 21, 2016 at 7:44 PM, David Storrs <david.sto...@gmail.com>
wrote:

> 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 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.
>
>
> In a related question, is there a way to introspect a struct to find
> out what its fields are?
>
>
> Dave
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to