@zenfs/core
Version:
A filesystem, anywhere
18 lines (17 loc) • 1.06 kB
TypeScript
import type { ParsedPath } from 'node:path';
import type { V_Context } from './context.js';
export type AbsolutePath = `/${string}`;
export declare const sep = "/";
export declare function normalizeString(path: string, allowAboveRoot: boolean): string;
export declare function formatExt(ext: string): string;
export declare function resolve(this: V_Context, ...parts: (string | undefined)[]): AbsolutePath;
export declare function normalize(path: string): string;
export declare function isAbsolute(path: string): path is AbsolutePath;
export declare function join(...parts: string[]): string;
export declare function relative(this: V_Context, from: string, to: string): string;
export declare function dirname(path: string): string;
export declare function basename(path: string, suffix?: string): string;
export declare function extname(path: string): string;
export declare function format(pathObject: ParsedPath): string;
export declare function parse(path: string): ParsedPath;
export declare function matchesGlob(pattern: string, str: string): boolean;