Skip to content
Snippets Groups Projects
Commit 60fa05db authored by MORIN Edouard's avatar MORIN Edouard
Browse files

fix: correctif pour system linux

parent 7c95e56a
No related branches found
No related tags found
No related merge requests found
...@@ -32,12 +32,19 @@ local_dir_rec <- function(path = getwd(), exept = list(), only = list()) { ...@@ -32,12 +32,19 @@ local_dir_rec <- function(path = getwd(), exept = list(), only = list()) {
res_files <- file.info(list.files(path=path, all.files=TRUE, full.names=TRUE, recursive = TRUE)) res_files <- file.info(list.files(path=path, all.files=TRUE, full.names=TRUE, recursive = TRUE))
res_files <- cbind(rownames(res_files), res_files) res_files <- cbind(rownames(res_files), res_files)
rownames(res_files) <- NULL rownames(res_files) <- NULL
colnames(res_files) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe") if(ncol(res_files)>8){
colnames(res_files) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe", paste0("X",seq(9, ncol(res_files))))
}else{
colnames(res_files) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe")
}
res_dirs <- file.info(list.dirs(path=path, full.names = TRUE, recursive = TRUE)) res_dirs <- file.info(list.dirs(path=path, full.names = TRUE, recursive = TRUE))
res_dirs <- cbind(rownames(res_dirs), res_dirs) res_dirs <- cbind(rownames(res_dirs), res_dirs)
rownames(res_dirs) <- NULL rownames(res_dirs) <- NULL
colnames(res_dirs) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe") if(ncol(res_dirs)>8){
print(rbind(res_files, res_dirs)) colnames(res_dirs) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe", paste0("X",seq(9, ncol(res_dirs))))
}else{
colnames(res_dirs) <- c("locpath","size","isdir","mode","mtime","ctime","atime","exe")
}
res_tot_loc <- rbind(res_files, res_dirs) %>% res_tot_loc <- rbind(res_files, res_dirs) %>%
filter(locpath != path) %>% filter(locpath != path) %>%
mutate(subpath = gsub(path,"",locpath), niv = str_count(subpath,'/'), type=ifelse(isdir,"dir","file"), name=locpath) %>% mutate(subpath = gsub(path,"",locpath), niv = str_count(subpath,'/'), type=ifelse(isdir,"dir","file"), name=locpath) %>%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment