pymensago/serverconn.py
def exists(conn: ServerConnection, path: str) -> RetVal:
	'''Checks to see if a path exists on the server side.'''
	if not path: 
		return RetVal().set_value('exists', False)
	
	status = conn.send_message({
		'Action' : 'EXISTS',
		'Data' : {
			'Path' : path
		}})
	if status.error():
		return status
	
	response = conn.read_response()
	if response.error():
		return response
	
	if response['Code'] == 200:
		return RetVal().set_value('exists', True)
	
	return RetVal().set_value('exists', True)
Checks to see if a path exists on the server side.
Checks to see if a path exists on the server side.
Checks to see if a path exists on the server side .
def exists(conn: ServerConnection, path: str) -> RetVal:
	if not path: 
		return RetVal().set_value('exists', False)
	status = conn.send_message({
		'Action' : 'EXISTS',
		'Data' : {
			'Path' : path
		}})
	if status.error():
		return status
	response = conn.read_response()
	if response.error():
		return response
	if response['Code'] == 200:
		return RetVal().set_value('exists', True)
	return RetVal().set_value('exists', True)
def exists ( conn : ServerConnection , path : str ) -> RetVal : if not path : return RetVal ( ) . set_value ( 'exists' , False ) status = conn . send_message ( { 'Action' : 'EXISTS' , 'Data' : { 'Path' : path } } ) if status . error ( ) : return status response = conn . read_response ( ) if response . error ( ) : return response if response [ 'Code' ] == 200 : return RetVal ( ) . set_value ( 'exists' , True ) return RetVal ( ) . set_value ( 'exists' , True )
Checks to see if a path exists on the server side.
Checks to see if a path exists on the server side .
'''Checks to see if a path exists on the server side.'''
conn
ServerConnection
path
str