flipper-plugin
Version:
Flipper Desktop plugin SDK and components
63 lines • 2.37 kB
TypeScript
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/**
* The path.join() method joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
* Zero-length path segments are ignored. If the joined path string is a zero-length string then '.' will be returned, representing the current working directory.
*
* @example
*
* path.join('/foo', 'bar', 'baz/asdf', 'quux', '..');
* Returns: '/foo/bar/baz/asdf'
*/
export declare function join(...args: string[]): string;
/**
* The path.normalize() method normalizes the given path, resolving '..' and '.' segments.
* When multiple, sequential path segment separation characters are found (e.g. /), they are replaced by a single instance of /. Trailing separators are preserved.
* If the path is a zero-length string, '.' is returned, representing the current working directory.
*
* @example
* path.normalize('/foo/bar//baz/asdf/quux/..');
* Returns: '/foo/bar/baz/asdf'
*/
export declare function normalize(path: string): string;
/**
* The path.extname() method returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than the first character of the basename of path (see path.basename()) , an empty string is returned.
*
* @example
* path.extname('index.html');
* Returns: '.html'
*
* path.extname('index.coffee.md');
* Returns: '.md'
*
* path.extname('index.');
* Returns: '.'
*
* path.extname('index');
* Returns: ''
*
* path.extname('.index');
* Returns: ''
*
* path.extname('.index.md');
* Returns: '.md'
*/
export declare function extname(path: string): string;
/**
* The path.basename() method returns the last portion of a path, similar to the Unix basename command. Trailing directory separators are ignored.
*
* @example
* path.basename('/foo/bar/baz/asdf/quux.html');
* Returns: 'quux.html'
*
* path.basename('/foo/bar/baz/asdf/quux.html', '.html');
* Returns: 'quux'
*/
export declare function basename(path: string, ext?: string): string;
//# sourceMappingURL=path.d.ts.map