CSVFileReader cannot read file with '~' in the path

Hello,

why can’t I use ‘~’ in these paths?

//works:
x= CSVFileReader.read("/Users/khofstadter/Library/Application Support/SuperCollider/downloaded-quarks/OpenBCI-SuperCollider/savedData/OpenBCI-RAW-2020-01-27_22-28-58_sc.txt");

//does not work:
x= CSVFileReader.read("~/Library/Application Support/SuperCollider/downloaded-quarks/OpenBCI-SuperCollider/savedData/OpenBCI-RAW-2020-01-27_22-28-58_sc.txt");

//posts:
WARNING: CSVFileReader: file ~/Library/Application Support/SuperCollider/downloaded-quarks/OpenBCI-SuperCollider/savedData/OpenBCI-RAW-2020-01-27_22-28-58_sc.txt not found.
	
//does not work: 	
x= CSVFileReader.read("~/Desktop/OpenBCI-RAW-2020-01-27_22-28-58_sc.txt");

//works: 
x= CSVFileReader.read("/Users/khofstadter/Desktop/OpenBCI-RAW-2020-01-27_22-28-58_sc.txt"); 



Many thank! k

1 Like

see

http://doc.sccode.org/Classes/String.html#-standardizePath

cheers,

eddi

2 Likes