Developer API
...
Metadata & Utilities
Function: exists()
3 min
docid\ wxgxpnpidcz6 2b6gh786 docid\ l2rwyc57gjg6s93mcecr9 / exists exists ( connection , path ) promise < any > defined in https //github com/xandeum/xandeum web3 js/blob/master/src/exists ts#l23 sends a json rpc request to the xandeum rpc endpoint to check if a file or directory exists this function calls the custom rpc method isexist , which should be implemented by the backend to validate the existence of metadata (files/directories) at a given path parameters connection connection the solana web3 connection with xandeum compatible json rpc endpoint (e g , 'https //api devnet solana com' ) path string the filesystem path to check (e g , /documents/myfile txt ) returns promise < any > a promise\<any> resolving to the rpc response json, typically including a result field indicating existence (e g , true or false ), or null if not found