code: def raw_filesize(path):
      # type: (str) -> Optional[int]
      
      with open('/dev/null', 'w') as devnull:
          status, output = shell("du", "-bs", path, raise_on_status=False,
                                 stderr=devnull)
      if status != 0:
          return None
      # output is: <size>\t<path>\n
      return int(output.split("\t", 1)[0])
docs: Get size of a file/directory in bytes.
  
      Will return None if path does not exist or cannot be accessed.