On 14 March 2011 16:45, Reinier Zwitserloot <[email protected]> wrote:

> Openable is a silly name, at least, if this is for an abstraction with the
> following primitives:
>
> mkdir(s)
> length
> canRead
> canWrite
> exists
> isDirectory
> delete
>

They'd be methods on a FileSystem singleton, all taking a URI as their first
argument.
Of the above, only isDirectory *could* be a method on a possibly-immutable
FileRef

Though "Openable" does sound a bit silly for directories, unless you count
metadata changes as requiring that the directory somehow be "opened".

etcetera
>
> File is rather specifically for, well, files. The abstraction for resources
> is Input and OutputStream. A few APIs fail to understand this and want you
> to call them with a File object instead of the more appropriate
> InputStream/OutputStream, but most get it right (or offer both). Some new
> API to address a few painpoints of the File API is coming in Java7. (google
> for "more new io" java).
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>



-- 
Kevin Wright

gtalk / msn : [email protected]
<[email protected]>mail: [email protected]
vibe / skype: kev.lee.wright
quora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not
regard them as "lines produced" but as "lines spent": the current
conventional wisdom is so foolish as to book that count on the wrong side of
the ledger" ~ Dijkstra

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to