Add two methods to interface (old change)
This commit is contained in:
parent
b1c21a1b80
commit
729bd94f81
21
pep-0262.txt
21
pep-0262.txt
|
@ -133,6 +133,14 @@ class InstallationDatabase:
|
||||||
enumerated in no particular order.
|
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:
|
class Package:
|
||||||
"""Instance attributes:
|
"""Instance attributes:
|
||||||
name : string
|
name : string
|
||||||
|
@ -163,6 +171,19 @@ class Package:
|
||||||
checksum all be provided as parameters to this method instead?
|
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
|
Deliverables
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue