Truncates long path expressions to a specified length for display.
DisplayPath(cFilename, nMaxLength) |
Parameters
- cFileName
-
Specifies the name of the file at the end of the target path. If you specify a string containing only spaces as cFileName, Visual FoxPro returns the current directory. If you specify an empty string as cFileName, DISPLAYPATH(В ) returns an empty string. You can obtain the path of the current directory by using the 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.
Returns
Character data type. DisplayPath(В ) returns a string and displays the path in lower case.
Remarks
DisplayPath(В ) returns a string suitable only for display purposes, so you cannot use the result to reference a file. The length of the resulting string is equal to or less than nMaxLength. However, 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
Reference
CURDIR( ) FunctionOther Resources
JUSTPATH(В ) FunctionADIR( ) Function
Functions
Language Reference