Function dirname

  • Parameters

    • filepath: string

      Path

    • full: boolean = false

      Get full path or file directory name only?

    Returns string

    Description

    Get full path to file or its directory name

    Example

    import { path } from '@biorate/tools';
    console.log(path.dirname('/www/root/index.html')); // root
    console.log(path.dirname('/www/root/index.html', true)); // /www/root

Generated using TypeDoc