nextcloud-node-client
Version:
Nextcloud client API for node.js TypeScript applications
40 lines (39 loc) • 1.26 kB
TypeScript
import Client, { File, Folder } from "./client";
import Command from "./command";
export interface GetFilesRecursivelyCommandOptions {
/**
* the source nextcloud folder to start listing the files
*/
sourceFolder: Folder;
/**
* function to filter files
*/
filterFile?: (file: File) => File | null;
}
/**
* Command to get all files of a nextcloud folder recursively
*/
export default class GetFilesRecursivelyCommand extends Command {
private sourceFolder;
private filterFile?;
private files;
/**
* @param {Client} client the client
* @param {SourceTargetFileNames[]} files the files to be uploaded
* @param {(file: File) => void} processAfterUpload callback function to process the uploaded file
*/
constructor(client: Client, options: GetFilesRecursivelyCommandOptions);
/**
* execute the command
* @async
* @returns {Promise<void>}
*/
protected onExecute(): Promise<void>;
getFiles(): File[];
/**
* adds files of folder and processes subordinated folders
* @param {Folder} folder the folder to process
* @param {number} percentagethe percentage that is finished, when the function returns
*/
private processFolder;
}