Docs » Autodocs » dos.library » FilePart
FilePart -- Returns the last component of a path (V36)
fileptr = FilePart( path ) D0 D1 STRPTR FilePart( STRPTR )
This function returns a pointer to the last component of a string path specification, which will normally be the file name. If there is only one component, it returns a pointer to the beginning of the string.
path - pointer to an path string. May be relative to the current directory or the current disk.
fileptr - pointer to the last component of the path.
FilePart("xxx:yyy/zzz/qqq") would return a pointer to the first 'q'. FilePart("xxx:yyy") would return a pointer to the first 'y').
PathPart(), AddPart()
|