更新记录

1.0.2(2024-04-11)

修复安卓编译警告信息处理。

1.0.1(2024-04-11)

Android新增是否外部路径参数isExternalPath,外部路径插件内部不进行转换。

1.0.0(2024-04-09)

初始化版本发布

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.6.8,Android:4.4,iOS:9 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

概述

XF-fileSystemUTS对文件操作的接口,通过此插件可对文件或文件夹进行创建、删除、移动、复制等相关操作。

插件接口

createDir

创建目录

uni-app项目中(vue/nvue)调用示例:

import { createDir } from "@/uni_modules/XF-fileSystemUTS"

createDir({
  path: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { createDir } from "@/uni_modules/XF-fileSystemUTS";
import { SystemOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  path: "",
  complete: (res : any) => {
    console.log(res)
  }
} as SystemOptions;
createDir(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

rmdir

删除文件目录,里面的所有文件将会一起被删除

uni-app项目中(vue/nvue)调用示例:

import { rmdir } from "@/uni_modules/XF-fileSystemUTS"

rmdir({
  path: "",
  complete: (res) => {
    console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { rmdir } from "@/uni_modules/XF-fileSystemUTS";
import { SystemOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  path: "",
  complete: (res : any) => {
    console.log(res)
  }
} as SystemOptions;
rmdir(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

createFile

创建文件

uni-app项目中(vue/nvue)调用示例:

import { createFile } from "@/uni_modules/XF-fileSystemUTS"

createFile({
  path: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { createFile } from "@/uni_modules/XF-fileSystemUTS";
import { SystemOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  path: "",
  complete: (res : any) => {
    console.log(res)
  }
} as SystemOptions;
createFile(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

remove

删除文件

uni-app项目中(vue/nvue)调用示例:

import { remove } from "@/uni_modules/XF-fileSystemUTS"

remove({
  path: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { remove } from "@/uni_modules/XF-fileSystemUTS";
import { SystemOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  path: "",
  complete: (res : any) => {
    console.log(res)
  }
} as SystemOptions;
remove(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

copyTo

拷贝文件

uni-app项目中(vue/nvue)调用示例:

import { copyTo } from "@/uni_modules/XF-fileSystemUTS"

copyTo({
  oldPath: "",
  newPath: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { copyTo } from "@/uni_modules/XF-fileSystemUTS";
import { CopyOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  oldPath: "",
  newPath: "",
  complete: (res : any) => {
    console.log(res)
  }
} as CopyOptions;
copyTo(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

moveTo

移动文件

uni-app项目中(vue/nvue)调用示例:

import { moveTo } from "@/uni_modules/XF-fileSystemUTS"

moveTo({
  oldPath: "",
  newPath: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { moveTo } from "@/uni_modules/XF-fileSystemUTS";
import { CopyOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  oldPath: "",
  newPath: "",
  complete: (res : any) => {
    console.log(res)
  }
} as CopyOptions;
moveTo(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

rename

重命名

uni-app项目中(vue/nvue)调用示例:

import { rename } from "@/uni_modules/XF-fileSystemUTS"

rename({
  oldPath: "",
  newPath: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { rename } from "@/uni_modules/XF-fileSystemUTS";
import { CopyOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  oldPath: "",
  newPath: "",
  complete: (res : any) => {
    console.log(res)
  }
} as CopyOptions;
rename(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

readDir

列出目录

uni-app项目中(vue/nvue)调用示例:

import { readDir } from "@/uni_modules/XF-fileSystemUTS"

readDir({
  path: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { readDir } from "@/uni_modules/XF-fileSystemUTS";
import { ListOptions } from "@/uni_modules/XF-fileSystemUTS/utssdk/interface.uts";

let options = {
  path: "",
  complete: (res : any) => {
    console.log(res)
  }
} as ListOptions;
readDir(options);

可用性

iOS、Android系统

可提供的1.0.0及更高版本

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问