UNPKG

netstorage

Version:

A TypeScript API and CLI for the Akamai NetStorage REST interface

37 lines (36 loc) 1.77 kB
import { type NetStorageClientConfig, type NetStorageStat } from '../index'; /** * Determines if remote file metadata is absent or empty. * * @param config - Client config with logger. * @param netStorageStat - Remote file metadata object. * @returns True if remote metadata is missing or invalid. */ export declare function isRemoteMissing(config: NetStorageClientConfig, netStorageStat?: NetStorageStat): boolean; /** * Compares the size of a local file with its remote counterpart. * * @param config - Client config with logger. * @param localPath - Absolute path to the local file. * @param netStorageStat - Remote file metadata object. * @returns True if sizes differ or remote size is missing. */ export declare function isSizeMismatch(config: NetStorageClientConfig, localPath: string, netStorageStat?: NetStorageStat): Promise<boolean>; /** * Checks if the local file's modification time is more recent than the remote file's. * * @param config - Client config with logger. * @param localPath - Absolute path to the local file. * @param netStorageStat - Remote file metadata object. * @returns True if local mtime is newer. */ export declare function isMtimeNewer(config: NetStorageClientConfig, localPath: string, netStorageStat?: NetStorageStat): Promise<boolean>; /** * Validates if the local file's MD5 checksum differs from the remote file's checksum. * * @param config - Client config with logger. * @param localPath - Absolute path to the local file. * @param netStorageStat - Remote file metadata object. * @returns True if checksums do not match or remote checksum is unavailable. */ export declare function isChecksumMismatch(config: NetStorageClientConfig, localPath: string, netStorageStat?: NetStorageStat): Promise<boolean>;