@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
25 lines (24 loc) • 802 B
TypeScript
import type { Driver } from '@directus/storage';
/**
* Returns the directory depth of the provided path
*/
export declare function pathDepth(path: string): number;
/**
* Reads the size and modified date of a file if it exists
*/
export declare function fsStat(path: string): Promise<{
size: number;
modified: Date;
} | null>;
/**
* Builds up the local and remote paths to use with syncing
*/
export declare function getSyncPaths(partialPath: string | undefined): {
localExtensionsPath: string;
remoteExtensionsPath: string;
};
/**
* Retrieve the stats for local and remote files and check if they are the same
* Returns false if files are differnt else true
*/
export declare function compareFileMetadata(localPath: string, remotePath: string, disk: Driver): Promise<boolean>;