Yeah, I'm thinking of renaming duck-streams/file to something like
file-str or filename.
-Stuart Sierra
On Apr 7, 1:13 am, samppi wrote:
> In addition, it's a bad idea to have these two superficially similar
> functions have the same name, "file". If, in the end, both are to be
> kept public, th
In addition, it's a bad idea to have these two superficially similar
functions have the same name, "file". If, in the end, both are to be
kept public, then I think they should at least be given different
names.
On Apr 6, 10:35 am, Victor Rodriguez wrote:
> Hello,
>
> On Mon, Apr 6, 2009 at 10:06
Hello,
On Mon, Apr 6, 2009 at 10:06 AM, James Reeves
wrote:
>
...
> The problem with having java-utils/file and duck-streams/file is that
> you lose the ability to load both namespaces at the same time without
> defining an exception for the file function. This does not seem like
> an ideal solu
James Reeves wrote:
> On Apr 6, 11:29 am, Jason Sankey wrote:
>> I think there may be a misunderstanding over "combining" here - I read
>> Stuart's mail to mean there was no obvious way to combine
>> duck-streams/file and java-utils/file, whereas this implementation shows
>> java-utils/file style
On Apr 6, 11:29 am, Jason Sankey wrote:
> I think there may be a misunderstanding over "combining" here - I read
> Stuart's mail to mean there was no obvious way to combine
> duck-streams/file and java-utils/file, whereas this implementation shows
> java-utils/file style behaviour only?
As far a
James Reeves wrote:
> On Apr 6, 4:10 am, Stuart Sierra wrote:
>> I don't see an obvious way of combining them.
>
> What about something like:
>
> (defn- normalize-separator
> [filepath]
> (.. (str filepath)
> (replace \\ File/separatorChar)
> (replace \/ File/separatorChar)))
>
> (
On Mon, Apr 6, 2009 at 10:40 AM, James Reeves
wrote:
>
> On Apr 6, 4:10 am, Stuart Sierra wrote:
>> I don't see an obvious way of combining them.
>
> What about something like:
>
> (defn- normalize-separator
> [filepath]
> (.. (str filepath)
> (replace \\ File/separatorChar)
> (replace \
On Apr 6, 4:10 am, Stuart Sierra wrote:
> I don't see an obvious way of combining them.
What about something like:
(defn- normalize-separator
[filepath]
(.. (str filepath)
(replace \\ File/separatorChar)
(replace \/ File/separatorChar)))
(defn file
[filepath & more]
(reduce
Good summary. Let's keep them separate until we feel pain.
- Stuart Halloway
> They work rather differently. duck-streams/file treats all arguments
> as strings, so
> (file "foo" "bar") =>
> I wrote it that way because I often want to construct a file name like
> (file base "." extension)
>
They work rather differently. duck-streams/file treats all arguments
as strings, so
(file "foo" "bar") =>
I wrote it that way because I often want to construct a file name like
(file base "." extension)
java-utils/file is closer to the Java File interface, by assuming that
each argument is a
I'd like it if they were combined. You could then use (file "foo/bar")
or (file "foo" "bar").
- James
On Apr 5, 9:25 pm, Stuart Halloway wrote:
> Doh! Missed that. The duck-streams and java-utils versions of file
> have overlapping but disjoint functionality. Other-Stuart, I can take
> a lo
Doh! Missed that. The duck-streams and java-utils versions of file
have overlapping but disjoint functionality. Other-Stuart, I can take
a look at combining these, or we can just leave them separate for now.
--Stuart
> On Apr 5, 5:07 pm, Stuart Halloway wrote:
>> Never worry about "foo" vs.
On Apr 5, 5:07 pm, Stuart Halloway wrote:
> Never worry about "foo" vs. (File. "foo") again!
>
> (doc file)
> -
> clojure.contrib.java-utils/file
> ([arg] [parent child] [parent child & more])
> Returns a java.io.File from string or file args.
>
> Notes:
>
> (1) You w
Never worry about "foo" vs. (File. "foo") again!
(doc file)
-
clojure.contrib.java-utils/file
([arg] [parent child] [parent child & more])
Returns a java.io.File from string or file args.
Notes:
(1) You will need to build contrib from source to see this.
(2) This fu
14 matches
Mail list logo