parameters: (self)
docstring: Create remote file/upload
docstring_summary: Create remote file/upload
docstring_tokens: Create remote file / upload
function: def _initiate_upload(self):
          """ Create remote file/upload """
          if "a" in self.mode:
              op, method = "APPEND", "POST"
          else:
              op, method = "CREATE", "PUT"
              if self.fs.exists(self.path):
                  # no "truncate" or "create empty"
                  self.fs.rm(self.path)
          out = self.fs._call(op, method, self.path, redirect=False, **self.kwargs)
          location = self.fs._apply_proxy(out.headers["Location"])
          if "w" in self.mode:
              # create empty file to append to
              out2 = self.fs.session.put(location)
              out2.raise_for_status()
          self.location = location.replace("CREATE", "APPEND")
function_tokens: def _initiate_upload ( self ) : if "a" in self . mode : op , method = "APPEND" , "POST" else : op , method = "CREATE" , "PUT" if self . fs . exists ( self . path ) : # no "truncate" or "create empty" self . fs . rm ( self . path ) out = self . fs . _call ( op , method , self . path , redirect = False , * * self . kwargs ) location = self . fs . _apply_proxy ( out . headers [ "Location" ] ) if "w" in self . mode : # create empty file to append to out2 = self . fs . session . put ( location ) out2 . raise_for_status ( ) self . location = location . replace ( "CREATE" , "APPEND" )