Add two methods to interface (old change)

This commit is contained in:
Andrew M. Kuchling 2002-10-13 20:20:23 +00:00
parent b1c21a1b80
commit 729bd94f81
1 changed files with 21 additions and 0 deletions

View File

@ -133,6 +133,14 @@ class InstallationDatabase:
enumerated in no particular order.
"""
def find_package (self, path):
"""find_file(path:string) : Package
Search and return the package containing the file 'path'.
Returns None if the file doesn't belong to any package
that the InstallationDatabase knows about.
XXX should this work for directories?
"""
class Package:
"""Instance attributes:
name : string
@ -163,6 +171,19 @@ class Package:
checksum all be provided as parameters to this method instead?
"""
def has_file (self, path):
"""has_file(path:string) : Boolean
Returns true if the specified path belongs to a file in this
package.
"""
def check_file (self, path):
"""check_file(path:string) : Boolean
Checks whether the file's size, checksum, and ownership match,
returning true if they do.
"""
Deliverables