Condividi tramite


DisplayPath( ) Function

Truncates long path expressions to a specified length for display.

DisplayPath(cFilename, nMaxLength)

Returns

Character

Parameters

  • cFileName
    Specifies the name of the file at the end of the target path. If you specify no path, Visual FoxPro uses the value of CURDIR( ).

    Note   This function does not check the validity of cFileName and will report the truncated path expression even if no such file exists.

  • nMaxLength
    Specifies the maximum length of the truncated result. nMaxLength must be greater than or equal to 10.

Remarks

This function returns a string for display purposes only, so you cannot use its result to reference to a file. The result string will be equal to or less than nMaxLength. The result does not break directory names. If inclusion of a directory name would exceed nMaxLength, the result is an ellipsis (). If the filename exceeds nMaxLength, the result is the filename plus extension.

See Also

JUSTPATH( ) Function | ADIR( ) Function