Function ExtractFileDir

  • Extracts the drive and directory parts from AFileName. Regardless of whether AFileName is a path or filename, this routine returns the path up to the last path.sep eg, AFileName contains K:\Development\TypeScript\delphirtl\tests the result is K:\Development\TypeScript\delphirtl

    Parameters

    • AFileNameOrPath: string

    Returns string