Full access to a folder in Delphi

351 Views Asked by At

I'm writing a function to check important settings in the program.

Among other things I would like to check if I have read and write access to a folder.

Is there any way to check this with Delphi?

1

There are 1 best solutions below

1
fpiette On BEST ANSWER

The simplest way to check if your application has write access to a folder is to try to create a new file and check for error code. No error means you have write access. If creation succeeded, delete the file and check for error (You may have permission to create a file, write to it but not to delete it).

If you prefer to use the more complex way, see the answers to this question.