Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi, I have problem with FileReader function. I can read info of file, but I cant read content.
String fileName = "d:\\ProUser\\text.txt";
File file = new File(fileName); //works good
if(file.canRead()== true){
DisplayMessage.infoMessage ( "Nacten cfg soubor: "+file.getParentFile()+"\\"+file.getName()+", absolutni cesta: "+file.getAbsolutePath()); //works good
FileReader fr = new FileReader(file); //error
fr.close(); //error
}else{
DisplayMessage.errorMessage ( "Nelze nacist soubor: "+fileName);
}
Any idea?
Thanks
in Creo2: