【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() 创建、修改、查看文件权限
相关推荐
海大哥11 小时前
深入解析Java中HashMap的工作原理与性能优化策略
r语言
万粉变现经纪人1 天前
如何解决 pip install -r requirements.txt 约束文件 constraints.txt 仅允许固定版本(未锁定报错)问题
开发语言·python·r语言·django·beautifulsoup·pandas·pip
万粉变现经纪人1 天前
如何解决 pip install -r requirements.txt 无效可编辑项 ‘e .‘(-e 拼写错误)问题
开发语言·python·r语言·beautifulsoup·pandas·pip·scipy
zhangfeng11332 天前
亲测可用,R语言 ggplot2 箱线图线条控制参数详解,箱线图离散数值控制
开发语言·python·r语言·生物信息
zhangfeng11332 天前
R 导出 PDF 时中文不显示 不依赖 showtext** 的最简方案(用 extrafont 把系统 TTF 真正灌进 PDF 内核)
开发语言·r语言·pdf·生物信息
生物小卡拉2 天前
R脚本--PCA分析系列1_v1.0
开发语言·r语言
生物小卡拉2 天前
R脚本——LefSE分析与可视化-v1
开发语言·r语言
猫头虎3 天前
如何解决 pip install -r requirements.txt 本地轮子路径 ‘./packages/xxx.whl’ 不存在 问题
开发语言·网络·python·r语言·pip·gpu算力·国产
zhangfeng11334 天前
R语言 表达矩阵 count_table 筛选出 行名是 某个 基因的 数据或者某个列中的数据是某个基因的数据
矩阵·r语言·生物信息
zhangfeng11335 天前
geo Counts 数据 ,机器学习 模型的外部验证 ROC外部验证数据处理流程
人工智能·机器学习·r语言·生物信息