Allowing permission on a directory programaticaly
Posted: Thu Apr 14, 2016 12:41 pm
Is-it possible with purebasic to allow read and write and read permission on a directory ?
Thanks in advance
Thanks in advance
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
TestFile.s = "C:\Test_Remove.txt"
If CreateFile(0, TestFile) ; = If CreateFile(0, TestFile) <> 0
Debug "I'm happy, I can write here :-)"
DeleteFile(TestFile) ; Remove test file
Else
Debug "Sorry, I can't write here file :-("
EndIf
- GetFileAttributes(Filename$)loulou2522 wrote:Is-it possible with purebasic to allow read and write and read permission on a directory ?
Code: Select all
Filename$ | The name of the file to modify. This can also specify the name of a directory.Also, (and before) don't forget to test if directory is directory or file and/or existloulou2522 wrote:In fact my question is the flollowing
I install a programm in a directory on which a write prefs Files and sqlite database.
I want to test if te directory is read only and if so i want to give permission to write files on these directory.