Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Problem with ActiveState's Win32::File module

by bikeNomad (Priest)
on Jul 31, 2001 at 05:37 UTC ( #101033=note: print w/replies, xml ) Need Help??


in reply to Problem with ActiveState's Win32::File module

Why don't you just reset the READONLY bit (I don't do Win32 stuff much, but just glanced at the docs)? I have no idea what NORMAL is, but I don't think there's a DOS attrib for that...

Win32::File::GetAttributes($path, $attr); Win32::File::SetAttributes($path, $attr & ~ READONLY);

Replies are listed 'Best First'.
Re: Re: Problem with ActiveState's Win32::File module
by John M. Dlugosz (Monsignor) on Jul 31, 2001 at 06:35 UTC
    NORMAL is no bits set. So you obviously can't use that to change anything! But it's used in directory list filtering and in creating files with the desired attributes.

    —John

    (P.S. the value of the constant is actually 128. But ORing that in doesn't make the other bits (READONLY=1) go away. Perhaps setting it, not ORing it in, works.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://101033]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2021-05-15 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (150 votes). Check out past polls.

    Notices?