Re: When Is A Drive Really Read Only?

new topic     » goto parent     » topic index » view thread      » older message » newer message

I've noticed that the dir() routine in Linux only sets the 'd' attribute where appropriate and it is so documented. You ought to write a unit test like:

 
include std/filesys.e 
include std/unittest.e 
-- I don't even use Windows right now.  Does system.dll even exist anymore? 
sequence system_dll = dir("C:\\WINDOWS\\SYSTEM.DLL") 
test_true("system.dll is marked as read-only", find('r', system_dll[1][D_ATTRIBUTES])) 
-- more examples of using places of Windows we know exist but we shouldn't be able to write to, 
-- maybe using test_false, for things that should be read-write. 
 
 
test_report() 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu