diff options
author | Keir Lawson <keirlawson@gmail.com> | 2019-05-18 02:44:53 +0100 |
---|---|---|
committer | Doug Tangren <d.tangren@gmail.com> | 2019-05-17 21:44:53 -0400 |
commit | e97bf7175ddf063788df2fa630b4dedcd19388a0 (patch) | |
tree | 852f2409cb29295df021cbf9d050a69f396ed485 /src | |
parent | 3df2c90e4855270a024de86d76ded25a0c2d4721 (diff) |
Switch path type requirement to make more ergonomic (#168)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -518,11 +518,13 @@ impl<'a, 'b> Container<'a, 'b> { /// The file will be copied at the given location (see `path`) and will be owned by root /// with access mask 644. The specified `path` parent location must exists, otherwise the /// creation of the file fails. - pub fn copy_file_into( + pub fn copy_file_into<P: AsRef<Path>>( &self, - path: &Path, + path: P, bytes: &[u8], ) -> impl Future<Item = (), Error = Error> { + let path = path.as_ref(); + let mut ar = tar::Builder::new(Vec::new()); let mut header = tar::Header::new_gnu(); header.set_size(bytes.len() as u64); |