Euphoria
Ticket #516:
Create a join_paths() function
-
Reported by
jeremy
Dec 08, 2010
join_paths({ "people", "john", "/doe.txt" })
-- windows: "people\\john\\doe.txt"
-- *nix: "people/john/doe.txt"
i.e. handles if slash is present or not, can join any number of path items.
Details
1. Comment by ne1uno
Dec 08, 2010
need an override slash param for forcing slash instead of backslash on windows or vice versa
2. Comment by jeremy
Jan 01, 2011
accepted ticket
3. Comment by jeremy
Jan 01, 2011
See: hg:euphoria/rev/e724410c67ea
changeset: 4457:e724410c67ea branch: 4.0 tag: tip user: Jeremy Cowgar <jeremy@cowgar.com> date: Sat Jan 01 10:06:03 2011 -0500 files: docs/release/4.0.1.txt include/std/filesys.e tests/t_filesys.e description: Added join_path and split_path methods, fixes ticket 516
4. Comment by jeremy
Jan 01, 2011
In regards to an override, I think it would be better if we had a convert_path type function that would convert a path to a given format. The reason I think this is:
- It will only be used in specialized situations
- Many other routines that do path manipulation do not provide slash override functionality
- A generic convert_path routine would allow any path to be converted back and forth providing functionality for any path you may be working with.