/** * Chunk large Promise.all executions. * * @export * @async * @template T * @param {Promise[]} promises * @param {number} [chunkSize=10000] * @param {boolean} [withResults=true] * @returns {Promise} */ export declare function promiseAllChunked(promises: Promise[], chunkSize?: number, withResults?: boolean): Promise; /** * Chunk large Promise.allSettled executions. * * @export * @async * @template T * @param {Promise[]} promises * @param {number} [chunkSize=10000] * @param {boolean} [withResults=true] * @returns {Promise} */ export declare function promiseAllSettledChunked(promises: Promise[], chunkSize?: number, withResults?: boolean): Promise; /** * Convert a timestamp from seconds to milliseconds. * * @export * @param {number} timestamp * @returns {number} */ export declare function convertTimestampToMs(timestamp: number): number; export declare function isPathOverMaxLength(path: string): boolean; export declare function isNameOverMaxLength(name: string): boolean; export declare const illegalCharsWindows: RegExp; export declare const reservedNamesWindows: RegExp; export declare const illegalCharsMacOS: RegExp; export declare const illegalCharsLinux: RegExp; export declare function isValidPath(inputPath: string): boolean; export declare function isNameIgnoredByDefault(name: string): boolean; export declare function isRelativePathIgnoredByDefault(path: string): boolean; export declare function isAbsolutePathIgnoredByDefault(path: string): boolean; export type SerializedError = { name: string; message: string; stack?: string; stringified: string; }; export declare function serializeError(error: Error): SerializedError; export declare function deserializeError(serializedError: SerializedError): Error; /** * Replace a path with it's new parent path. * * @export * @param {string} path * @param {string} from * @param {string} to * @returns {string} */ export declare function replacePathStartWithFromAndTo(path: string, from: string, to: string): string; /** * Check if a path includes a dot file. * * @export * @param {string} path * @returns {boolean} */ export declare function pathIncludesDotFile(path: string): boolean; export declare function normalizeUTime(time: number): number; /** * We need to normalize lastModified times (milliseconds) for delta comparison. * Some filesystems provide different floating point precisions, therefore sometimes borking the comparison. * We normalize it to a second. * Downside is that we _can_ miss modifications if they happen in the 1000ms window that we are rounding too. * * @export * @param {number} time * @returns {number} */ export declare function normalizeLastModifiedMsForComparison(time: number): number; export declare function fastHash(input: string): string; export declare function tryingToSyncDesktop(path: string): boolean; export declare function pathSyncedByICloud(path: string): Promise; export declare function isPathSyncedByICloud(path: string): Promise;