Part of canonical.librarian.db View In Hierarchy
Method | __init__ | Create a new database access object. |
Method | lookupBySHA1 | Undocumented |
Method | getAlias | Returns a LibraryFileAlias, or raises LookupError. |
Method | getAliases | Undocumented |
Method | add | Undocumented |
Method | addAlias | Add an alias, and return its ID. |
Parameters | restricted | If this is set to true, only restricted will be served. Otherwise only public files will be served. Files created in this library will marked as restricted. |
A LookupError is raised if no record with the given ID exists or if not related LibraryFileContent exists.
Parameters | token | The token for the file. If None no token is present. When a token is supplied, it is looked up with path. |
path | The path the request is for, unused unless a token is supplied; when supplied it must match the token. The value of path is expected to be that from a twisted request.args e.g. /foo/bar. |