UNPKG

@xuanqikai/one-click-upload

Version:

A CLI tool for one-click file upload to cloud storage services (OSS, TOS)

46 lines 1.35 kB
import { FileInfo } from '../types'; /** * 获取文件信息 */ export declare function getFileInfo(filePath: string, basePath?: string): Promise<FileInfo>; /** * 递归扫描目录,获取所有文件 */ export declare function scanDirectory(dirPath: string, basePath?: string): Promise<FileInfo[]>; /** * 检查路径是否存在 */ export declare function pathExists(filePath: string): Promise<boolean>; /** * 格式化文件大小 */ export declare function formatFileSize(bytes: number): string; /** * 格式化持续时间 */ export declare function formatDuration(milliseconds: number): string; /** * 标准化路径分隔符(统一使用正斜杠) */ export declare function normalizePath(filePath: string): string; /** * 确保远程路径格式正确 */ export declare function normalizeRemotePath(remotePath: string): string; /** * 生成远程文件路径 */ export declare function generateRemoteFilePath(remotePath: string, fileName: string): string; /** * 检查文件是否为隐藏文件 */ export declare function isHiddenFile(fileName: string): boolean; /** * 获取文件扩展名 */ export declare function getFileExtension(fileName: string): string; /** * 创建目录(如果不存在) */ export declare function ensureDir(dirPath: string): Promise<void>; //# sourceMappingURL=fileUtils.d.ts.map