I have a file in the storage and I can’t check it, because the name of the file is unicode. That’s why the FileExist function return with false, but the file is exist, it’s sure, because when i list it, the file name will show. The file name is a hungarian word.
IsolatedStorageFile fileStorage = IsolatedStorageFile.GetUserStoreForApplication();
// List files
List<String> fileList = new List<String>(fileStorage.GetFileNames("Informations/*"));
(string file in fileList)
{
MessageBox.Show("file: " + file);
// Will appear: "file: Felhasználási Feltételek.html"
}
// Check file: return false
if (fileStorage.FileExists("Informations/Felhasználási Feltételek.html"))
{
}
What is the solution? Thanks
I founded the problem:
i copied the file name from windows explorer, i put F2 on the file, ctrl+c and ctrl+v into source code. the file name was correct into code, but when the application was run, the fileName value was wrong and the solution was that i wrote the filename by keyboard.