[Tutor] File mode tests (original) (raw)
nick at javacat.f2s.com nick at javacat.f2s.com
Fri Jul 30 09:35:05 CEST 2004
- Previous message: [Tutor] File mode tests
- Next message: [Tutor] Ideas for beginning programs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Bill
Quoting Bill Campbell <bill at celestial.net>:
if ( -x path ) # is is executable if ( -r path ) # is it readable if ( -w path ) # is it writeable
os.X_OK, os.R_OK and os.W_OK
eg
import os os.access('/etc/hosts', os.R_OK) True os.access('/etc/hosts', os.W_OK) False
Hope that helps Nick.
Everyone should have http://www.freedom2surf.net/
- Previous message: [Tutor] File mode tests
- Next message: [Tutor] Ideas for beginning programs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]