SetFileMode
BlitzMax Forums/BlitzMax Programming/SetFileMode
| ||
Hi guys, does anyone have an explanation as how to use this? The example isn't very helpful unless you just want to set the file to read-only. Anyone got an example of what all the bits do? |
| ||
They seem to be the unix rwx filemodes. See getfilemode. UNIX filemode is user,group,all. |
| ||
Oh, I see. so the bits are: user group all rwx rwx rwx where: r=read w=write x=execute so if you wanted to make the file read-only for everyone you'd do: setFileMode("data.txt",%000000111) Anyone know how to make a file hidden? That right? |
| ||
That would make the file read, write and execute for everybody EXCEPT the user and group who wouldn't have any access. To make it read-only you'd have to set 'everybody' to 100 Doesn't seem to do anything under windows though. Not sure how to make a file hidden. |
| ||
Read only for the user, those in the same group and everyone else would be 100100100. Setting it to 000000100 would mean that the user and those in his group are explicitely denied read, write and execute, and it would be read-only for everyone else. |
| ||
I see. Thanks guys. Anyone got the heads up on making a file invisible like a ninja? |