ambiata/ivory — pull request #277 by etorreborre (2014-09-17 06:05:02+00:00)
Title: DirPaths

Sorry about the huge PR again.

The idea of these changes is to use the `DirPath/FilePath` classes from mundane. In order to do this I have done the following changes:

- The `Repository` now returns `ReferenceIO`s when asked for `factset`, `snasphot`, `dictionaries`,...
- A `ReferenceIO` encapsulates a `Store[ResultTIO]` and a `DirPath` that is relative to the store root path
- A `ReferenceIO` can either represent a directory or a file. It is up to the user of the `ReferenceIO` to know what to expect (for example for a Hadoop job, it could be either a file or a directory)
- The `ReferenceStore` object provides methods to read/write/list files/directories from a `Reference` as required by the various low-level "Store" classes
- The list methods on "Store" take `DirPath` arguments that are supposed to be relative to the store root and return `FilePaths/DirPaths` that are also relative to the store root
- There is a `fullDirPath` method on a `ReferenceIO` to access the full path of the reference (including the store path)
- There is a `.toHdfs` method for `ReferenceIO` returning a `Path` object for the full reference path