<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello developers,</p>
<p><br>
</p>
<p><span>I'm using python 2.7 with pylxd 2.2.3 and lxd 2.12. I could use 'lxc file push' to send files or directories easily. But with pylxd, the put function of the file manager requires a destination path and file data. I did some tests and </span><span style="font-size:12pt">found
 out I could send text contents into a container, but if I read a binary file then sent the data to the destination file in a container, then there would be a defference between the source file and destination one.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">And I've no idea how to send a direcory. The only way I could think of now is to recursively read each file and recreate them in the container(or execute bash cmd to do such things). But again how should I handle the binary files?</span></p>
<p><span><br>
</span></p>
<p><span>So, what's the correct way to send binary files or even directories into containers with pylxd?</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Thanks,</span><br>
</p>
<p>Kun</p>
</div>
</body>
</html>