DirectoryComplete

Function DirectoryComplete(dirpath: String) : String
Returns a path as a string

This function makes it easy to manipulate file paths. It makes sure that a directory path is finished with a windows-style directory backslash by adding one if there is not one there.

This is useful if you are taking user input for a folder path and you want to read a file in that folder.

Example:

Program
  Uses
basilisk, pure2d

Begin
  InitBasilisk(TRUE)
  OpenScreen(640,480,32,FALSE,COB_SHOWCLOSE+COB_SHOWBORDER)
  
  Text(10,10,"myfolder + myfile -> ")
  Text(10,30,DirectoryComplete("myfolder")+"myfile")
  
  While Not ExitRequested
   Flip
   Pause
(2)
  Wend
     
End