No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
afeb08f
... +40 ...
30eb4d6
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
14 | 14 | ||
15 | 15 | old <- setwd(dir) |
|
16 | 16 | on.exit(setwd(old)) |
|
17 | - | files <- dir(dir, ..., recursive = recursive, full.names = full.names) |
|
17 | + | files <- dir(".", ..., recursive = recursive, full.names = full.names) |
|
18 | 18 | ||
19 | 19 | archive_write_files(archive, files, format = format, filter = filter, options = options) |
|
20 | 20 |
48 | 48 | for (std::string file : files) { |
|
49 | 49 | stat(file.c_str(), &st); |
|
50 | 50 | entry = archive_entry_new(); |
|
51 | + | #if defined(_WIN32) || (!defined(__GNUC__) && !defined(__clang__)) |
|
52 | + | // there are quite many CRT dialects and passing struct stat to 3rdparty library could be unstable. |
|
53 | + | archive_entry_set_size(entry, st.st_size); |
|
54 | + | archive_entry_set_mtime(entry, st.st_mtime, 0); |
|
55 | + | archive_entry_set_ctime(entry, st.st_ctime, 0); |
|
56 | + | archive_entry_set_atime(entry, st.st_atime, 0); |
|
57 | + | archive_entry_set_mode(entry, st.st_mode); // seems required as not defaulting to S_IFREG. |
|
58 | + | #else |
|
51 | 59 | archive_entry_copy_stat(entry, &st); |
|
60 | + | #endif |
|
52 | 61 | archive_entry_set_pathname(entry, file.c_str()); |
|
53 | 62 | call(archive_write_header, a, entry); |
|
54 | 63 | if ((fd = open(file.c_str(), O_RDONLY)) != -1) { |
70 | 79 | } |
|
71 | 80 | call(archive_write_free, a); |
|
72 | 81 | ||
82 | + | cli_progress_done(progress_bar); |
|
83 | + | ||
73 | 84 | return R_NilValue; |
|
74 | 85 | } |
1 | 1 | ## usethis namespace: start |
|
2 | 2 | #' @useDynLib archive, .registration = TRUE |
|
3 | 3 | #' @importFrom tibble as_tibble |
|
4 | + | #' @importFrom cli cli_progress_bar |
|
4 | 5 | ## usethis namespace: end |
|
5 | 6 | NULL |
|
6 | 7 |
15 | 16 | #' @seealso [archive_read()], [archive_write()] to read and write archive files |
|
16 | 17 | #' using R connections, [archive_extract()], [archive_write_files()], |
|
17 | 18 | #' [archive_write_dir()] to add or extract files from an archive. |
|
18 | - | #' @returns @return A [tibble][tibble::tibble-package] with details about files in the archive. |
|
19 | + | #' @return A [tibble][tibble::tibble-package] with details about files in the archive. |
|
19 | 20 | #' @examples |
|
20 | 21 | #' a <- archive(system.file(package = "archive", "extdata", "data.zip")) |
|
21 | 22 | #' a |
156 | 157 | } |
|
157 | 158 | package_version("0.0.0") |
|
158 | 159 | } |
|
160 | + | ||
161 | + | print_versions <- function(){ |
|
162 | + | cat("Linked to:\n") |
|
163 | + | cat("libarchive", as.character(libarchive_version()), '\n') |
|
164 | + | cat("zlib", as.character(libarchive_zlib_version()), '\n') |
|
165 | + | cat("lzma", as.character(libarchive_liblzma_version()), '\n') |
|
166 | + | cat("bzlib", as.character(libarchive_bzlib_version()), '\n') |
|
167 | + | cat("zsstd", as.character(libarchive_libzstd_version()), '\n') |
|
168 | + | } |
Learn more Showing 7 files with coverage changes found.
src/r_archive.h
src/r_archive.cpp
src/archive_extract.cpp
src/archive_read.cpp
R/zzz.R
src/archive.cpp
R/archive.R
30eb4d6
4d65d2c
962363c
f638b5b
b2aeaac
275348a
48129b7
cbc0db3
7803644
6282215
57eb283
4f65a2e
85d6dd7
89e03e3
4b87059
bb14f0c
0968845
62597ff
c570c9f
1f9387e
e6b5ce0
bad2e52
d4e1c3f
957d6ce
1791f69
52b2f1e
a1207e9
2c764be
1473ef4
7b60d65
#63
d983154
dfbd4ea
c35c8f4
2928f2f
c6f771c
c290517
5560c71
cff73f9
646ae67
c35e1c5
0ad142f
afeb08f