From 729bd94f810441b52e4e61bab03cd52b4c4846d1 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sun, 13 Oct 2002 20:20:23 +0000 Subject: [PATCH] Add two methods to interface (old change) --- pep-0262.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pep-0262.txt b/pep-0262.txt index 41f3aba45..49ccaeeb7 100644 --- a/pep-0262.txt +++ b/pep-0262.txt @@ -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