扫描可读可写

#-*-coding:UTF-8-*-

import os,sys

path = "C:\Users\def\PycharmProjects\untitled"
for fpathe,dirs,fs in os.walk(path):
  for f in fs:
    all_file = os.path.join(fpathe,f)
    if os.access(all_file,os.W_OK):
        print all_file + u"可写"
    else:
        print all_file + u"不可写"

  

原文地址:https://www.cnblogs.com/nul1/p/8417610.html