Chapter 2. Programming

Table of Contents

1. Overview
2. The Repository Class
3. File Objects
4. The Series Class
5. Sheepdip Integration
6. Summary
7. The DMTX Library
8. The Inotify Module
9. Implementation
9.1. Database (Metadata)
9.2. Filesystem (Data)
9.3. Locations

1. Overview

The framework is made up of two primary classes: the DMS::Repository class and the DMS::File class. The Repository represents a single connection to the repository and manages concurrent access to it. The File class provides the means to read from and write to files in the repository. Just as there are two principle components to DMS — the database and file system — so these classes kind of represent those components. The Repository class shadows the database and File class the file system.

Note

Should you need more code for examples, the test suite (in ruby/test/repo.rb) contains working code that uses every part oxf the repository module. It is a good place to play around with actual code and familiarize yourself with the API.