Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Oct 14, 2022
1 parent cc7ebb9 commit 3b63c4f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func goFilesystem() {
fs := filesystem.New(adapter)

// 使用
fs.Write(path string, contents string) bool
fs.Write(path string, contents string) (bool, error)
}
~~~

Expand All @@ -44,43 +44,43 @@ func goFilesystem() {

~~~go
// 写入
fs.Write(path, contents string) bool
fs.Write(path, contents string) (bool, error)

// 写入数据流
fs.WriteStream(path string, resource io.Reader) bool
fs.WriteStream(path string, resource io.Reader) (bool, error)

// 添加数据
fs.Put(path, contents string) bool
fs.Put(path, contents string) (bool, error)

// 添加数据流
fs.PutStream(path string, resource io.Reader) bool
fs.PutStream(path string, resource io.Reader) (bool, error)

// 读取后删除
fs.ReadAndDelete(path string) (any, error)

// 更新
fs.Update(path, contents string) bool
fs.Update(path, contents string) (bool, error)

// 读取
fs.Read(path string) any
fs.Read(path string) (string, error)

// 重命名
fs.Rename(path, newpath string) bool
fs.Rename(path, newpath string) (bool, error)

// 复制
fs.Copy(path, newpath string) bool
fs.Copy(path, newpath string) (bool, error)

// 删除
fs.Delete(path string) bool
fs.Delete(path string) (bool, error)

// 删除文件夹
fs.DeleteDir(dirname string) bool
fs.DeleteDir(dirname string) (bool, error)

// 创建文件夹
fs.CreateDir(dirname string) bool
fs.CreateDir(dirname string) (bool, error)

// 列出内容
fs.ListContents(dirname string) bool
fs.ListContents(dirname string) ([]map[string]any, error)
~~~


Expand Down

0 comments on commit 3b63c4f

Please sign in to comment.