parameters: (path, mode='rw')
docstring: Check path authority
          full: read & write & execute
          exist: exist
          rw: read & write
          r: read
docstring_summary: Check path authority
          full: read & write & execute
          exist: exist
          rw: read & write
          r: read
docstring_tokens: Check path authority full : read & write & execute exist : exist rw : read & write r : read
function: def check_dir_access(path, mode='rw'):
          """
          Check path authority
          full: read & write & execute
          exist: exist
          rw: read & write
          r: read
          """
          if mode == 'full':
              authority = Constant.AUTHORITY_FULL
          elif mode == 'exist':
              authority = Constant.AUTHORITY_EXIST
          elif mode == 'rw':
              authority = Constant.AUTHORITY_RW
          elif mode == 'r':
              authority = Constant.AUTHORITY_R
          else:
              raise Exception(Errors.PARAMETER['gauss_0201'] % mode)
          results = []
          for check_mode in authority.values():
              results.append(os.access(path, check_mode))
          if not all(results):
              raise Exception(Errors.PERMISSION['gauss_0701'] % path)
function_tokens: def check_dir_access ( path , mode = 'rw' ) : if mode == 'full' : authority = Constant . AUTHORITY_FULL elif mode == 'exist' : authority = Constant . AUTHORITY_EXIST elif mode == 'rw' : authority = Constant . AUTHORITY_RW elif mode == 'r' : authority = Constant . AUTHORITY_R else : raise Exception ( Errors . PARAMETER [ 'gauss_0201' ] % mode ) results = [ ] for check_mode in authority . values ( ) : results . append ( os . access ( path , check_mode ) ) if not all ( results ) : raise Exception ( Errors . PERMISSION [ 'gauss_0701' ] % path )