parameters: (path: typing.Union[None, str, pathlib.Path] = None)
docstring: Resolve FTP path using PWD file.
docstring_summary: Resolve FTP path using PWD file.
docstring_tokens: Resolve FTP path using PWD file .
function: def resolve_path(path: typing.Union[None, str, pathlib.Path] = None) -> pathlib.Path:
      """Resolve FTP path using PWD file."""
      if FTP_PWD_FILE.exists():
          with FTP_PWD_FILE.open("r") as fd:
              pwd = fd.readline()
      else:
          # default home location is root directory
          pwd = os.environ.get("MAVFTP_HOME", "/")
  
      pwd = pathlib.Path(pwd)
  
      if not path:
          return pwd.resolve()  # no path - PWD location
      elif path.startswith("/"):
          return pathlib.Path(path).resolve()  # absolute path
      else:
          return (pwd / path).resolve()
function_tokens: def resolve_path ( path : typing . Union [ None , str , pathlib . Path ] = None ) -> pathlib . Path : if FTP_PWD_FILE . exists ( ) : with FTP_PWD_FILE . open ( "r" ) as fd : pwd = fd . readline ( ) else : # default home location is root directory pwd = os . environ . get ( "MAVFTP_HOME" , "/" ) pwd = pathlib . Path ( pwd ) if not path : return pwd . resolve ( ) # no path - PWD location elif path . startswith ( "/" ) : return pathlib . Path ( path ) . resolve ( ) # absolute path else : return ( pwd / path ) . resolve ( )