Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

Resetting the read only attribute

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Arí Ricardo Ody

Is there a way to turn a 'read only' file to 'non-read only'???

Reading the manual I can't conclude how to do this... (I'm talking about windows XP files)

Greetings from Sao Paulo - Brazil

Ricardo

Reply by email

Tomas Hajny
to Arí Ricardo Ody: Is there a way to turn a 'read only' file to 'non-read only'??? Reading the manual I…
Arí Ricardo Ody wrote
Is there a way to turn a 'read only' file to 'non-read only'??? Reading the manual I can't conclude how to do this... (I'm talking about windows XP files)

I guess that it's mostly because attribute
setting isn't portable across platforms
(SysUtils.FileSetAttr always returns -1 on all
Unix platforms and Dos.SetFAttr is simply ignored
there). DOS-like (which includes Windows and
OS/2) attributes are partly emulated for
functions reading attributes, but their changes
cannot be emulated meaningfully (well, it might
be possible the other way round, i.e. emulating
the more complex/complete solution for writing
and the simpler one for reading, but the
usefulness would be probably questionable.

Tomas

Reply by email