files

package
v0.3.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, data []byte) error

将数据写入指定路径的文件。 如果目录不存在,将会递归创建目录。 如果文件不存在,将会创建该文件;如果文件已存在,将会覆盖原有内容。

入参:

  • path: 文件路径。
  • data: 文件数据字节数组。

出参:

  • 错误。

func WriteString

func WriteString(path string, content string) error

Write 类似,但写入的是字符串内容。

入参:

  • path: 文件路径。
  • content: 文件内容。

出参:

  • 错误。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL