file utility functions for golang

Signed-off-by: Rack Lin <racklin@gmail.com>