netstorage
Version:
A TypeScript API and CLI for the Akamai NetStorage REST interface
21 lines (20 loc) • 1.46 kB
TypeScript
import { type NetStorageClientConfig, type SyncDirectoryParams, type SyncResult } from '../../index';
/**
* Synchronizes files between a local directory and a NetStorage remote directory.
*
* @param config - Authenticated NetStorage client config
* @param localPath - Absolute or relative path to the local directory
* @param remotePath - Remote NetStorage directory path
* @param dryRun - If true, simulates operations without making changes
* @param conflictRules - Optional map to resolve specific file conflicts
* @param compareStrategy - File comparison strategy to decide transfer necessity
* @param syncDirection - Direction of sync: upload, download, or both
* @param conflictResolution - Default conflict resolution strategy
* @param deleteExtraneous - Whether to remove files not present on the opposite side
* @param onTransfer - Callback invoked after a file transfer
* @param onDelete - Callback invoked after a file deletion
* @param onSkip - Callback invoked when a file is skipped
* @param maxConcurrency - Maximum number of concurrent sync operations
* @returns Summary result of transferred, skipped, and deleted entries
*/
export declare function syncDirectory(config: NetStorageClientConfig, { localPath, remotePath, dryRun, conflictRules, compareStrategy, syncDirection, conflictResolution, deleteExtraneous: deleteExtraneousParam, onTransfer, onDelete, onSkip, maxConcurrency, }: SyncDirectoryParams): Promise<SyncResult>;