There does not currently exist an easy method to determine whether a path exists and is a directory, and whether it is available for read and optionally for write access. Basic functions ( for example, the Dir() function, FilePicker dialog, and FolderPicker dialog ) do not operate as expected or consistently when confronted with error cases.
This functionality could be added as a new method of the Simple File Access object. There are numerous ways in which paths can have temporary of permanent failures due to permissions, SELinux violations, network failures, and network share security errors to name a few. Ideally with this enhanced method of checking for errors, the more obvious areas of potential failures would be screened out (e.g. – file does not exist) and it would provide a catch-all for all other failure cases. This method should also have the option to check for write access and return feedback if write access is not possible for any reason.
As another alternative, there is very similar functionality already included in the “setDisplayDirectory()” method of the FilePicker dialog when the LibreOffice dialog style is used. It will generate a user warning or error to the user but no feedback is provided to the program (for screen shots and more information see 3.2.2, “Debug Level Three (FilePicker Behavior)“ regarding Linux and 3.3.2, “Debug Level Three (FilePicker Behavior)“ regarding Windows).
I will upload a document with screen shots and other supporting documentation.
Created attachment 98560 [details]
Enhancement – Improved File Path Checking; screen shots and description
This document provides screen shots and supporting documentation for the desired capabilties incorporated in the enhancement request. Cross reference to other bugs found or confirmed while creating this document are also included.
Noel: Thoughts on this rfe?
(In reply to Ewald Anderl from comment #0)
> There does not currently exist an easy method to determine whether a path
> exists and is a directory, and whether it is available for read and
> optionally for write access.
If such a method doesn't exist, then let's consider adding it.
Status -> NEW