Export an existing VON anchor wallet. Raise WalletState if wallet is closed.

        :param von_wallet: open wallet
        :param path: path to which to export wallet
15445
async def export_wallet(self, von_wallet: Wallet, path: str) -> None:
        

        LOGGER.debug('WalletManager.export_wallet >>> von_wallet %s, path %s', von_wallet, path)

        if not von_wallet.handle:
            LOGGER.debug('WalletManager.export_wallet <!< Wallet %s is closed', von_wallet.name)
            raise WalletState('Wallet {} is closed'.format(von_wallet.name))

        await wallet.export_wallet(
            von_wallet.handle,
            json.dumps({
                'path': path,
                **von_wallet.access_creds
            }))

        LOGGER.debug('WalletManager.export_wallet <<<')
1037483
def GET(self, path):
        
        url = self._absolute_url(path)
        resp = requests.get(url, headers=self.headers, verify=self.verify_ssl)
        if resp.status_code != 200:
            raise MispTransportError('GET %s: returned status=%d', path, resp.status_code)
        return resp.content
1345522
public SftpFile openDirectory(String path) throws SftpStatusException,
			SshException {

		String absolutePath = getAbsolutePath(path);

		SftpFileAttributes attrs = getAttributes(absolutePath);

		if (!attrs.isDirectory()) {
			throw new SftpStatusException(SftpStatusException.SSH_FX_FAILURE,
					path + " is not a directory");
		}

		try {
			UnsignedInteger32 requestId = nextRequestId();
			Packet msg = createPacket();
			msg.write(SSH_FXP_OPENDIR);
			msg.writeInt(requestId.longValue());
			msg.writeString(path, CHARSET_ENCODING);
			sendMessage(msg);

			byte[] handle = getHandleResponse(requestId);

			SftpFile file = new SftpFile(absolutePath, attrs);
			file.setHandle(handle);
			file.setSFTPSubsystem(this);

			return file;
		} catch (SshIOException ex) {
			throw ex.getRealException();
		} catch (IOException ex) {
			throw new SshException(ex);
		}

	}
584906
def export(self, nidm_version, export_dir, prepend_path):
        
        if self.path is not None:
            if export_dir is not None:
                # Copy file only if export_dir is not None
                new_file = os.path.join(export_dir, self.filename)
                if not self.path == new_file:
                    if prepend_path.endswith('.zip'):
                        with zipfile.ZipFile(prepend_path) as z:
                            extracted = z.extract(str(self.path), export_dir)
                            shutil.move(extracted, new_file)
                    else:
                        if prepend_path:
                            file_copied = os.path.join(prepend_path, self.path)
                        else:
                            file_copied = self.path
                        shutil.copy(file_copied, new_file)

                    if self.temporary:
                        os.remove(self.path)
            else:
                new_file = self.path

        if nidm_version['num'] in ["1.0.0", "1.1.0"]:
            loc = Identifier("file://./" + self.filename)
        else:
            loc = Identifier(self.filename)

        self.add_attributes([(NFO['fileName'], self.filename)])

        if export_dir:
            self.add_attributes([(PROV['atLocation'], loc)])

        if nidm_version['num'] in ("1.0.0", "1.1.0"):
            path, org_filename = os.path.split(self.path)
            if (org_filename is not self.filename) \
                    and (not self.temporary):
                self.add_attributes([(NFO['fileName'], org_filename)])

        if self.is_nifti():
            if self.sha is None:
                self.sha = self.get_sha_sum(new_file)
            if self.fmt is None:
                self.fmt = "image/nifti"

            self.add_attributes([
                (CRYPTO['sha512'], self.sha),
                (DCT['format'], self.fmt)
            ])
1267696
def update(self, path):
        
        self._reset()
        self.path = path
        self._refresh_synced()
        if self.is_synced:
            self._refresh_path()
            self._refresh_signed()
            self._refresh_nvr()
1167713
public InputStream getURLStream(String path) throws NoSuchPathException, IOException {
		URL url = null;
		try {
			url = new URL(path);
		} catch (MalformedURLException e) {
			throw new NoSuchPathException(e);
		}

		return url.openStream();
		
	}
277948
def create(self, path, value=b"", acl=None, ephemeral=False,
               sequence=False):
        
        super(XTransactionRequest, self).create(path, to_bytes(value), acl, ephemeral, sequence)
1097439
@Override
    public Promise<Void> chown(String path, String user, String group) {
        return adapter.toPromise(handler -> vertx.fileSystem().chown(path, user, group, handler));
    }
1239823
public void setExportPath(String exportPath) {

        if (exportPath.equals(OpenCms.getSystemInfo().getWebApplicationRfsPath())) {
            // not allowed because a full static export would delete the opencms directory
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_EXPORT_PATH_1, m_name));
        }
        m_exportPath = exportPath;
    }
772720
@Nullable
    public static StoredPaymentChannelClientStates getFromWallet(Wallet wallet) {
        return (StoredPaymentChannelClientStates) wallet.getExtensions().get(EXTENSION_ID);
    }
47072
async def close_wallet_search(wallet_search_handle: int) -> None:
    

    logger = logging.getLogger(__name__)
    logger.debug("close_wallet_search: >>> wallet_search_handle: %r",
                 wallet_search_handle)

    if not hasattr(close_wallet_search, "cb"):
        logger.debug("close_wallet_search: Creating callback")
        close_wallet_search.cb = create_cb(CFUNCTYPE(None, c_int32, c_int32))

    c_wallet_search_handle = c_int32(wallet_search_handle)

    res = await do_call('indy_close_wallet_search',
                        c_wallet_search_handle,
                        close_wallet_search.cb)

    logger.debug("close_wallet_search: <<< res: %r", res)
    return res
986025
async def close(self) -> None:
        

        LOGGER.debug('Wallet.close >>>')

        if not self.handle:
            LOGGER.warning('Abstaining from closing wallet %s: already closed', self.name)
        else:
            LOGGER.debug('Closing wallet %s', self.name)
            await wallet.close_wallet(self.handle)
            self._handle = None
            if self.auto_remove:
                LOGGER.info('Automatically removing wallet %s', self.name)
                await self.remove()
        self._handle = None

        LOGGER.debug('Wallet.close <<<')
701800
async def get_anchor_did(self) -> str:
        

        LOGGER.debug('Wallet.get_anchor_did >>>')

        if not self.handle:
            LOGGER.debug('Wallet.get_anchor_did <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))

        rv = None
        dids_with_meta = json.loads(await did.list_my_dids_with_meta(self.handle))  # list

        latest = 0
        for did_with_meta in dids_with_meta:
            try:
                meta = json.loads(did_with_meta['metadata']) if did_with_meta['metadata'] else {}
                if not meta.get('anchor', False):
                    continue
                if isinstance(meta, dict) and meta.get('since', -1) > latest:
                    rv = did_with_meta.get('did')
            except json.decoder.JSONDecodeError:
                continue  # it's not an anchor DID, carry on

        LOGGER.debug('Wallet.get_anchor_did <<< %s', rv)
        return rv
717969
public function mapAssetLocation($path)
    {
        $url = URL::to('/' . ltrim($path, '/'))->getRelativeUrl();
        $this->setAssetURL($url);
    }
484918
def export(vault_client, opt):
    """"""
    ctx = Context.load(get_secretfile(opt), opt) \
                 .fetch(vault_client)
    for resource in ctx.resources():
        resource.export(opt.directory)
1326742
def serve_coil_assets(path):
    
    res = pkg_resources.resource_filename(
        'coil', os.path.join('data', 'coil_assets'))
    return send_from_directory(res, path)
793866
def with_path(self, path):
        
        new_command = copy.deepcopy(self)
        new_command._paths.append(str(path))
        return new_command