<div dir="ltr">Technically, paths are path-string?.<div><br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 1:57 PM, Asumu Takikawa <span dir="ltr"><<a href="mailto:asumu@ccs.neu.edu" target="_blank">asumu@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2013-04-19 20:18:53 +0200, Manfred Lotz wrote:<br>
> path : path-string?<br>
><br>
> [...]<br>
<div class="im">><br>
> I would expect that the first parameter path is a string and that the<br>
> second parameter is an optional parameter denoting a file mode. Further<br>
> I would assume that file->string returns a string containing the whole<br>
> file.<br>
><br>
> From this I'm wondering why there are predicates when for example I<br>
> would expect strings?<br>
<br>
</div>Is the question about the `path` argument in particular? The<br>
documentation here is just saying `path` should be any value that can<br>
pass the `path-string?` predicate, which is a subset of the values that<br>
pass `string?`.<br>
<br>
So for example "\0" is an invalid argument because<br>
-> (path-string? "\0")<br>
#f<br>
<br>
but "/tmp" is fine because<br>
-> (path-string? "/tmp")<br>
#t<br>
<br>
The documentation of `path-string?` has more details.<br>
<br>
Cheers,<br>
Asumu<br>
<div class="HOEnZb"><div class="h5">____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br></div>