【R语言】fs 工具功能速查

文件操作

文件操作 函数作用
file_copy() dir_copy() link_copy() 复制文件、目录、链接
file_create() dir_create() link_create() 创建文件、目录、链接
file_delete() dir_delete() link_delete() 删除文件、目录、链接
file_access() file_exists() dir_exists() link_exists() 文件是否存在和权限查询
file_chmod() 更改文件权限
file_chown() 更改文件的所有者和组
file_info() file_size() 文件信息
file_move() 移动和重命名文件
file_show() 打开文件或目录
file_temp() file_temp_push() file_temp_pop() path_temp() 临时文件或路径
file_touch() 与linux不同,不创建文件,仅更改文件访问和修改时间

目录操作

目录操作 函数作用
file_copy() dir_copy() link_copy() 复制文件、目录、链接
file_create() dir_create() link_create() 创建文件、目录、链接
file_delete() dir_delete() link_delete() 删除文件、目录、链接
dir_ls() dir_map() dir_walk() dir_info() 查看文件列表、信息
dir_tree() 以树状结构打印文件
file_access() file_exists() dir_exists() link_exists() 文件是否存在和权限查询

链接操作

链接操作 函数作用
file_copy() dir_copy() link_copy() 复制文件、目录、链接
file_create() dir_create() link_create() 创建文件、目录、链接
file_delete() dir_delete() link_delete() 删除文件、目录、链接
file_access() file_exists() dir_exists() link_exists() 文件是否存在和权限查询
link_path() 读取链接文件路径

路径操作

路径操作 函数作用
path() path_wd() 构造文件、目录路径;获取当前路径
file_temp() file_temp_push() file_temp_pop() path_temp() 创建临时文件
path_expand() path_expand_r() path_home() path_home_r() 查找用户主目录
path_file() path_dir() path_ext() path_ext_remove() path_ext_set() path_ext<-() 处理文件路径
path_filter() 筛选路径
path_real() path_split() path_join() path_abs() path_norm() path_rel() path_common() path_has_parent() 处理路径
path_package() 包的路径
path_sanitize() 通过删除目录路径和无效字符清理文件名
path_tidy() 整洁路径

辅助函数

帮助函数 函数作用
is_file() is_dir() is_link() is_file_empty() 测试文件类型
as_fs_path() fs_path() 文件路径
as_fs_bytes() fs_bytes() 可读文件的大小
as_fs_perms() fs_perms() 创建、修改、查看文件权限
相关推荐
Tiger Z14 小时前
《R for Data Science (2e)》免费中文翻译 (第17章) --- Dates and times(1)
r语言·编程·数据科学
杜子不疼.21 小时前
计算机视觉热门模型手册:Faster R-CNN / YOLO / SAM 技术原理 + 应用场景对比
人工智能·计算机视觉·r语言·cnn
Davina_yu1 天前
Windows 下升级 R 语言至最新版
开发语言·windows·r语言
青春不败 177-3266-05202 天前
基于R语言生物信息学大数据分析与绘图技术应用
数据分析·r语言·生物信息·生信·高通量
Catherinemin2 天前
【R语言】2.注释&基础运算
开发语言·r语言
邢博士谈科教2 天前
TCGA单基因高低分组的差异分析后的GSEA-GO和KEGG富集分析教程
数据分析·r语言
Catherinemin3 天前
【R语言】1.安装&基础语法
开发语言·r语言
Tiger Z3 天前
R 语言科研绘图 --- 3D绘图-汇总1
r语言·论文·科研·绘图·研究生
kisshuan123964 天前
黄芪属植物物种识别与分类:基于 Faster R-CNN C4 模型的深度学习实现
深度学习·分类·r语言
闻缺陷则喜何志丹5 天前
【二分查找】P9822 [ICPC2020 Shanghai R] Walker【有误差】|普及
开发语言·算法·r语言