Salmon
Loading...
Searching...
No Matches
salmon_fs.salmon.utils.salmon_file_exporter Namespace Reference

Classes

class  SalmonFileExporter
 

Functions

 export_file (int index, int final_part_size, int final_running_threads, int file_size, IRealFile real_file_to_export, IRealFile real_file, str shm_total_bytes_read_name, str shm_cancel_name, int buffer_size, bytearray key, bool integrity, bytearray|None hash_key, int chunk_size)
 
 export_file_part (SalmonFile file_to_export, IRealFile exported_file, int start, int count, memoryview|None total_bytes_written, int buffer_size, str|None shm_cancel_name=None, list[bool]|None stopped=None, Callable[[int, int], Any]|None on_progress=None)
 

Detailed Description

MIT License

Copyright (c) 2021 Max Kas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Function Documentation

◆ export_file()

export_file ( int index,
int final_part_size,
int final_running_threads,
int file_size,
IRealFile real_file_to_export,
IRealFile real_file,
str shm_total_bytes_read_name,
str shm_cancel_name,
int buffer_size,
bytearray key,
bool integrity,
bytearray | None hash_key,
int chunk_size )

◆ export_file_part()

export_file_part ( SalmonFile file_to_export,
IRealFile exported_file,
int start,
int count,
memoryview | None total_bytes_written,
int buffer_size,
str | None shm_cancel_name = None,
list[bool] | None stopped = None,
Callable[[int, int], Any] | None on_progress = None )
Export a file part from the drive.

:param file_to_export:      The file the part belongs to
:param exported_file:        The file to copy the exported part to
:param start:             The start position on the file
:param count:             The length of the bytes to be decrypted
:param total_bytes_written: The total bytes that were written to the external file
:param buffer_size: The buffer size
:param shm_cancel_name: The shared memory for cancelation
:param stopped: The stopped flag
:param on_progress: The progress listener