Function getFileInfo

  • Extracts file information from a URL or file path.

    Returns

    Object containing file information

    Example

    getFileInfo('https://example.com/path/Document%20Name.PDF')
    returns {
    name: 'Document Name.PDF',
    type: 'pdf',
    base: 'Document Name'
    }

    getFileInfo('invalid/url')
    returns {
    name: 'Unknown File',
    type: '',
    base: 'Unknown File'
    }

    Parameters

    • url: string

      The URL or file path to process

    Returns FileInfo

Generated using TypeDoc