On 14 Mar 2011 13:18, "Miroslav Pokorny" <[email protected]> wrote: > > @Kevin > > >> >> In this case, I'm invoking the `of` factory method on the `FileRef` singleton. This method accepts a URI argument, so you're also using an implicit conversion from String=>Uri. De-sugaring, it's equivalent to: >> >> val dir: FileRef = FileRef.of(Uri("C:\somedirectory")) >> > > Why is FileRef a better name than FilePath ? It seems to just make for a much more convulated / unnecessary complex heirarchy. >
Because it isn't a path, it's just a handle allowing you to open a "File". It could just as easily represent a dynamically created temporary file, mapped memory, or an I/O channel to some attached USB device. If I was to pick another name, it's the "File" prefix that would be first against the wall when the revolution comes. "ResourceRef" would be one possibility. Or even just "Openable" > -- > 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. -- 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.
