fs

package
v0.0.0-...-8fa4d24 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2013 License: BSD-3-Clause Imports: 9 Imported by: 0

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

func CopyFile(dest, src string) error

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

func CopyFilesRecursively(dest, src string) error

CopyFilesRecursively copies the contents of the directory src into dest. 通过递归调用,将 src 下的文件子文件全都复制到 dest下面

func GetTimes

func GetTimes(p string) (time.Time, time.Time, error)

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

func MakeDirIfNotExists(dir string) error

MakeDirIfNotExists creates the given directory if it does not exist. 创建一个文件夹如果这个文件夹不存在

Types

This section is empty.

Jump to

Keyboard shortcuts

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