• Checks if a given path is a valid file path.

    Example

    isFile('/home/demo/pictures/dummy.jpeg')
    // => true

    isFile('/home/demo/pictures)
    // => true

    isFile('/home/demo/pictures/)
    // => false

    isFile('C:\\Users\\Documents\\File1.txt')
    // => true

    isFile('/var/www/html/index.html')
    // => true

    isFile('C:\\Users\\Documents\\Folder1')
    // => false

    Parameters

    • path: string

      The path to be checked.

    Returns boolean

    true if the path is a valid file path, false otherwise.

Generated using TypeDoc v0.24.7