20
vendor/gopkg.in/godo.v2/glob/fileAsset.go
generated
vendored
Normal file
20
vendor/gopkg.in/godo.v2/glob/fileAsset.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package glob
|
||||
|
||||
import "os"
|
||||
|
||||
// FileAsset contains file information and path from globbing.
|
||||
type FileAsset struct {
|
||||
os.FileInfo
|
||||
// Path to asset
|
||||
Path string
|
||||
}
|
||||
|
||||
// Stat updates the stat of this asset.
|
||||
func (fa *FileAsset) Stat() (*os.FileInfo, error) {
|
||||
fi, err := os.Stat(fa.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fa.FileInfo = fi
|
||||
return &fa.FileInfo, nil
|
||||
}
|
||||
Reference in New Issue
Block a user