I’m currently using this to read my files as inputStream, it works under windows, will this work in LINUX?
File file = new File(currentDirectory.getCanonicalPath().toString() + "\\" + "myfile.txt");
If not what is the right way to read files, this “\\” looks kind of “fishy”
ADD-ON
I forgot this :
File currentDirectory = new File(".");
Instead of hard-coding the filename separator, use
File.separatorthere.Better yet, use: