finish sending files for data transfer

This commit is contained in:
marlon-erler
2024-07-28 02:27:09 +02:00
parent c9131c77ee
commit e75565a9f0
6 changed files with 178 additions and 13 deletions
+8 -1
View File
@@ -56,10 +56,17 @@ export default class FileTransferModel {
};
// sending
sendFiles = (...directoryPaths: string[][]): void => {
sendFiles = (
directoryPaths: BuiltinIterator<string[]>,
callback: (path: string) => void
): void => {
for (const directoryPath of directoryPaths) {
this.storageModel.recurse(directoryPath, (filePath: string[]) => {
this.sendFile(filePath);
const pathString: string = StorageModel.pathComponentsToString(
...filePath
);
callback(pathString);
});
}
};