diff options
author | Jürg Billeter <j@bitron.ch> | 2019-06-12 17:57:59 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-08-20 07:41:23 +0200 |
commit | 6690df63a7a41aaaa80bde85f16d283ff59a4f8f (patch) | |
tree | 6a5e21d5492663c8da2454f35764d25c453bb219 /src/buildstream | |
parent | 32191bab48d7b8c8965ddbcc2cae93802028f29b (diff) | |
download | buildstream-6690df63a7a41aaaa80bde85f16d283ff59a4f8f.tar.gz |
cascache.py: Remove unused method list_objects()
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_cas/cascache.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index ab3895058..fa55f5d94 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -440,31 +440,6 @@ class CASCache(): except FileNotFoundError as e: raise CASCacheError("Attempt to access unavailable ref: {}".format(e)) from e - # list_objects(): - # - # List cached objects in Least Recently Modified (LRM) order. - # - # Returns: - # (list) - A list of objects and timestamps in LRM order - # - def list_objects(self): - objs = [] - mtimes = [] - - for root, _, files in os.walk(os.path.join(self.casdir, 'objects')): - for filename in files: - obj_path = os.path.join(root, filename) - try: - mtimes.append(os.path.getmtime(obj_path)) - except FileNotFoundError: - pass - else: - objs.append(obj_path) - - # NOTE: Sorted will sort from earliest to latest, thus the - # first element of this list will be the file modified earliest. - return sorted(zip(mtimes, objs)) - def clean_up_refs_until(self, time): ref_heads = os.path.join(self.casdir, 'refs', 'heads') |