I am attempting to determine whether or not a selected directory is
writable.
I am using Active Tcl/Tk 8.4.5 on WinXP and accessing directories on both
Win and Unix. I let the user select a directory using tk_chooseDirectory. I
want to determine if I should disable a separate button that would call a
proc that copies some files to that directory.
I tried 'file writable $dir' and always get back 1, never 0 - even though I
have selected directories that I know I have no write access to.
I have also tried 'file stat $dir' and extracted the mode from the array and
always get the following
result: 16868
I have also tried 'file attributes $dir -readonly' and always get the value
0
I am at a loss.
Dave
-----------------
David L. Heim phone: (319)295-8616
400 Collins Road NE email: dlheim@rockwellcollins.com
Cedar Rapids, IA 52498
M/S 106-186
writable.
I am using Active Tcl/Tk 8.4.5 on WinXP and accessing directories on both
Win and Unix. I let the user select a directory using tk_chooseDirectory. I
want to determine if I should disable a separate button that would call a
proc that copies some files to that directory.
I tried 'file writable $dir' and always get back 1, never 0 - even though I
have selected directories that I know I have no write access to.
I have also tried 'file stat $dir' and extracted the mode from the array and
always get the following
result: 16868
I have also tried 'file attributes $dir -readonly' and always get the value
0
I am at a loss.
Dave
-----------------
David L. Heim phone: (319)295-8616
400 Collins Road NE email: dlheim@rockwellcollins.com
Cedar Rapids, IA 52498
M/S 106-186