This is a very rough and verbose overview of an API that is simplistic and can be kept consistent across the entire code base. I visited many API possibilities that could have been used, and this API came out as the best combination of everything available.
First we'll start with examples from the file system API. This is a partial set of all features that already exist, also included are some new APIs.