parameters: (self, mode=0o666, exist_ok=True)
docstring: Create this file with the given access mode, if it doesn't exist.
docstring_summary: Create this file with the given access mode, if it doesn't exist.
docstring_tokens: Create this file with the given access mode if it doesn t exist .
function: def touch(self, mode=0o666, exist_ok=True):
          """
          Create this file with the given access mode, if it doesn't exist.
          """
          if self._closed:
              self._raise_closed()
          if exist_ok:
              # First try to bump modification time
              # Implementation note: GNU touch uses the UTIME_NOW option of
              # the utimensat() / futimens() functions.
              try:
                  self._accessor.utime(self, None)
              except OSError:
                  # Avoid exception chaining
                  pass
              else:
                  return
          flags = os.O_CREAT | os.O_WRONLY
          if not exist_ok:
              flags |= os.O_EXCL
          fd = self._raw_open(flags, mode)
          os.close(fd)
function_tokens: def touch ( self , mode = 0o666 , exist_ok = True ) : if self . _closed : self . _raise_closed ( ) if exist_ok : # First try to bump modification time # Implementation note: GNU touch uses the UTIME_NOW option of # the utimensat() / futimens() functions. try : self . _accessor . utime ( self , None ) except OSError : # Avoid exception chaining pass else : return flags = os . O_CREAT | os . O_WRONLY if not exist_ok : flags |= os . O_EXCL fd = self . _raw_open ( flags , mode ) os . close ( fd )