Collection-file-path and expand-user-path

If I use:
(collection-file-path "alpha-bool.ss" "DG" "all") ;that returns:
#path:/home/don/.plt-scheme/4.2.1/collects/DG/all/alpha-bool.ss

When an executable of the program is made, does the "/home/don" portion of the path pose a problem because the target machine will have something other than "/home/don"?
I suspect that I will need to instead use: (build-path (expand-user-path) ...

Don please slow down for a bit and actually explain to us what you are trying to do.

If you want to write an application that uses files relative to its working directory, others have already pointed you to use define-runtime-path in other topics.

Why use define-runtime-path? Because it cooperates with raco exe and raco distribute, so that when you create an executable and distribution for your application, those commands automatically know how to "pack" the files you refer to into your distribution. Without you having to manually modify pathes. If that isn't what you want to do please let us know what it is. If we have an idea of what you want to accomplish it is easier to help.

2 Likes