How to check if a file exists
Hi,
I looked at the source code but I didn't find how to check if a file exists before reading.
Thanks
Hey @alecava58, the user can only select files that are present. You can indeed have a file handle for a file longer than the actual file lives. I will explore the exact behavior for this and ensure there is a way to discover if the file no longer exists.
Hi Kristoffer, thanks for quick reply.
What I'm looking for is a function like System.IO.File.Exists(filename) and if the function returns true upload the file in client memory.
You can't open arbitrary files. Only files that the user has directly opened or files present in directories that the user has chosen directly. In the directory case, you can very easily get a list of all files and folders in it and continue from there.
Ok. I understand.
Thanks for sharing your useful library.
I'm keeping this issue open to explore what exceptions we should get when trying to read a file that has been moved.