File: bucket.py

package info (click to toggle)
python-b2sdk 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,020 kB
  • sloc: python: 30,902; sh: 13; makefile: 8
file content (34 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
######################################################################
#
# File: b2sdk/v0/bucket.py
#
# Copyright 2019 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from __future__ import annotations

from b2sdk import v1


class Bucket(v1.Bucket):
    def list_file_names(self, start_filename=None, max_entries=None, prefix=None):
        """
        Legacy interface which just returns whatever remote API returns.
        """
        return self.api.session.list_file_names(self.id_, start_filename, max_entries, prefix)

    def list_file_versions(
        self, start_filename=None, start_file_id=None, max_entries=None, prefix=None
    ):
        """
        Legacy interface which just returns whatever remote API returns.
        """
        return self.api.session.list_file_versions(
            self.id_, start_filename, start_file_id, max_entries, prefix
        )


class BucketFactory(v1.BucketFactory):
    BUCKET_CLASS = staticmethod(Bucket)