Documentation ¶
Overview ¶
Package fs contains functions that access or modify the filesystem that are useful to the goblog application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
Copy file makes an exact copy fo the file at src and saves it to dest. The contents of dest are overwritten if it exists. 复制源文件到目标文件夹中,如果这个文件已经存在,那么覆盖这个文件
func CopyFilesRecursively ¶
CopyFilesRecursively copies the contents of the directory src into dest. 通过递归调用,将 src 下的文件子文件全都复制到 dest下面
func GetTimes ¶
GetTimes attempts to get the create and last modify times of the given path. It first tries using git for the first and last commits. If that fails, it uses the system time. 根据提供的路径获取创建和最后一次修改的时间。 首先是去尝试去获得第一次和最后一次git commit的时间。如果失败了,就再去使用系统的时间。
func MakeDirIfNotExists ¶
MakeDirIfNotExists creates the given directory if it does not exist. 创建一个文件夹如果这个文件夹不存在
Types ¶
This section is empty.