Documentation
¶
Index ¶
- func GetLatestFileByModTime(path string) (string, error)
- func GetLatestFileByName(path string) (string, error)
- func ReadCSVFile(path string, out any) error
- func ReadFile(path string, out any, unmarshal ...unmarshal) error
- func ReadJsonFile(path string, out any) error
- func ReadYAMLFile(path string, out any) error
- func SaveFile(path string, data any, optFns ...fsutil.OpenOptionFunc) error
- func TimestampFileName(path string) string
- func WriteCSVFile(path string, data any) error
- func WriteFile(path string, data any, marshal ...marshal) error
- func WriteJsonFile(path string, data any) error
- func WriteYAMLFile(path string, data any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLatestFileByModTime ¶
GetLatestFileByModTime 获取最新的文件,基于文件的修改时间
func GetLatestFileByName ¶
GetLatestFileByName 获取最新的文件,基于文件名中的时戳
func TimestampFileName ¶
TimestampFileName 将 path 中的 * 替换为当前时间戳(格式为 20060102_150405)
func WriteCSVFile ¶
WriteCSVFile 将 data 写入到 CSV 文件中,如果 path 中包含 *,则会替换为当前时间戳(格式为 20060102_150405)
func WriteJsonFile ¶
WriteJsonFile 将 data 写入到 JSON 文件中,如果 path 中包含 *,则会替换为当前时间戳(格式为 20060102_150405)
func WriteYAMLFile ¶
WriteYAMLFile 将 data 写入到 YAML 文件中,如果 path 中包含 *,则会替换为当前时间戳(格式为 20060102_150405)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.