层级

  • FileSystemAdapter
    • MgFileSystemAdapter

构造函数

方法

  • 参数

    • srcPath: string

      Source file path.

    • destPath: string

      Destination file path.

    返回 Promise<void>

    Copies a file from srcPath to destPath.

    复制文件。

  • 参数

    • path: string

      Directory path.

    • 可选options: {
          recursive?: boolean;
      }

      Options for creating the directory. If recursive is true, creates the directory recursively.

      • 可选recursive?: boolean

    返回 Promise<void>

    Creates a directory.

    创建目录。

  • 参数

    • path: string

      File path.

    • 可选encoding: string

      If encoding is not specified, the file will be read as binary data. If encoding is specified, the file will be read as a string.

    返回 Promise<string | ArrayBuffer>

    Reads a file.

    读取文件。

  • 参数

    • path: string

      Directory path.

    • 可选options: {
          recursive?: boolean;
      }

      Options for deleting the directory. If recursive is true, deletes the directory recursively.

      • 可选recursive?: boolean

    返回 Promise<void>

    Deletes a directory.

    删除目录。

  • 参数

    • zipFilePath: string

      Path to the zip file.

    • targetPath: string

      Path to the target directory where the files will be extracted.

    返回 Promise<void>

    Unzips a zip file.

    解压缩zip文件。

  • 参数

    • path: string

      File path.

    • data: string | ArrayBuffer

      Data to write.

    • 可选encoding: string

      Encoding type.

    返回 Promise<void>

    Writes a file. If encoding is not specified, the file will be written as binary data. If encoding is specified, the file will be written as a string.

    写入文件。如果没有指定编码,则文件将作为二进制数据写入。如果指定了编码,则文件将作为字符串写入。