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