private string PathInDestination(FileSystemInfo element) { return Path.Combine(DestinationPath, element.RelativeTo(_source)); }
/// <inheritdoc/> protected override void HandleSymlink(FileSystemInfo symlink, byte[] data) { #region Sanity checks if (symlink == null) throw new ArgumentNullException(nameof(symlink)); if (data == null) throw new ArgumentNullException(nameof(data)); #endregion _tarStream.PutNextEntry(new TarEntry(new TarHeader { Name = symlink.RelativeTo(SourceDirectory), TypeFlag = TarHeader.LF_SYMLINK, Size = data.Length })); _tarStream.Write(data); _tarStream.CloseEntry(); }
/// <inheritdoc/> protected override void HandleSymlink(FileSystemInfo symlink, byte[] data) { #region Sanity checks if (symlink == null) throw new ArgumentNullException(nameof(symlink)); if (data == null) throw new ArgumentNullException(nameof(data)); #endregion _zipStream.PutNextEntry(new ZipEntry(symlink.RelativeTo(SourceDirectory)) { Size = data.Length, HostSystem = HostSystemID.Unix, ExternalFileAttributes = ZipExtractor.DefaultAttributes | ZipExtractor.SymlinkAttributes }); _zipStream.Write(data); }