【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() 创建、修改、查看文件权限
相关推荐
翰佰尔HiOmics云分析2 天前
转录组分析实战:GO与KEGG富集分析原理及R语言实现
r语言·转录组·krgg
Q一件事2 天前
R语言处理潜在蒸散nc数据
开发语言·r语言
胡侃有料4 天前
【目标检测】two-stage------Mask R-CNN浅析-2018
目标检测·r语言·cnn
饭九钦vlog6 天前
一键配置kali脚本
r语言
维维180-3121-14556 天前
从入门到精通:R语言结构方程模型(SEM)在生态学研究中的全面应用
r语言·生态·环境·农业·林业
Teacher.chenchong8 天前
R语言实现物种分布预测与生态位分析:多元算法实现物种气候生态位动态分析与分布预测,涵盖数据清洗、模型评价到论文写作全流程
开发语言·算法·r语言
AAIshangyanxiu8 天前
基于R语言的物种气候生态位动态量化与分布特征模拟-组合物种分布模型(Ensemble Species Distribution Model)
r语言·物种分布·物种气候生态位·物种气候
云和数据.ChenGuang8 天前
r=re.search(r‘data-original=“(.*?)“‘, line)指令解析
数据库·mysql·r语言
2301_783360138 天前
R语言机器学习系列|随机森林模型特征重要性排序的R语言实现
随机森林·机器学习·r语言