import { BaseOptions } from './types.cjs'; import 'node:fs'; /** * Convert path to unix format. * {@link https://kythuen.github.io/ephemeras/fs/unixPath | View Details} * * @param path Path to convert. * @returns Unix format path. * * @example * unixPath('abc/ab/c') //--> 'abc/ab/c' * unixPath('abc\\ab\\c') //--> 'abc/ab/c' */ declare function unixPath(path: string): string; /** * Get relative path from base path. * {@link https://kythuen.github.io/ephemeras/fs/relativePath | View Details} * * @param path Source path. * @param base Base path. * @returns Relative path from base. * * @example * relativePath('/abc/b/1.txt', '/abc') //--> 'b/1.txt' * relativePath('/abc/b/1.txt', 'abc\\b') //--> '1.txt' */ declare function relativePath(path: string, base?: string): string; type GetLeafsOptions = { /** * Empty directory in result. * @default true */ emptyDir: boolean; } & BaseOptions; /** * Get leaf items of directory. * {@link https://kythuen.github.io/ephemeras/fs/getLeafs | View Details} * * @param path Source path. * @param options See {@link GetLeafsOptions }. * @returns Leaf items list of the directory. * * @example * getLeafs('/foo/bar') //--> ['/xxx', '1.txt', 'sub1/1.txt', ...] */ declare function getLeafs(path: string, options?: Partial): string[]; export { type GetLeafsOptions, getLeafs, relativePath, unixPath };