b2sdk.sync.action
¶
-
class
b2sdk.sync.action.
AbstractAction
[source]¶ Bases:
object
An action to take, such as uploading, downloading, or deleting a file. Multi-threaded tasks create a sequence of Actions which are then run by a pool of threads.
An action can depend on other actions completing. An example of this is making sure a CreateBucketAction happens before an UploadFileAction.
-
run
(bucket, reporter, dry_run=False)[source]¶ Main action routine.
- Parameters
bucket (b2sdk.bucket.Bucket) – a Bucket object
reporter – a place to report errors
dry_run (bool) – if True, perform a dry run
-
-
class
b2sdk.sync.action.
B2UploadAction
(local_full_path, relative_name, b2_file_name, mod_time_millis, size)[source]¶ Bases:
b2sdk.sync.action.AbstractAction
File uploading action.
-
class
b2sdk.sync.action.
B2HideAction
(relative_name, b2_file_name)[source]¶
-
class
b2sdk.sync.action.
B2DownloadAction
(relative_name, b2_file_name, file_id, local_full_path, mod_time_millis, file_size)[source]¶ Bases:
b2sdk.sync.action.AbstractAction
-
__init__
(relative_name, b2_file_name, file_id, local_full_path, mod_time_millis, file_size)[source]¶
-
-
class
b2sdk.sync.action.
B2CopyAction
(relative_name, b2_file_name, file_id, dest_b2_file_name, mod_time_millis, size)[source]¶ Bases:
b2sdk.sync.action.AbstractAction
File copying action.
-
class
b2sdk.sync.action.
B2DeleteAction
(relative_name, b2_file_name, file_id, note)[source]¶
-
class
b2sdk.sync.action.
LocalDeleteAction
(relative_name, full_path)[source]¶