// Close closes the File, rendering it unusable for I/O.
func(f*File)Close()error{
returnf.File.Close()
}
// Info returns the here.Info of the file
func(f*File)Info()here.Info{
returnf.her
}
// Name retuns the name of the file in pkger format
func(fFile)Name()string{
returnf.path.String()
}
// Readdir reads the contents of the directory associated with file and returns a slice of up to n FileInfo values, as would be returned by Lstat, in directory order. Subsequent calls on the same file will yield further FileInfos.
//
// If n > 0, Readdir returns at most n FileInfo structures. In this case, if Readdir returns an empty slice, it will return a non-nil error explaining why. At the end of a directory, the error is io.EOF.
//
// If n <= 0, Readdir returns all the FileInfo from the directory in a single slice. In this case, if Readdir succeeds (reads all the way to the end of the directory), it returns the slice and a nil error. If it encounters an error before the end of the directory, Readdir returns the FileInfo read until that point and a non-nil error.
// Open implements the http.FileSystem interface. A FileSystem implements access to a collection of named files. The elements in a file path are separated by slash ('/', U+002F) characters, regardless of host operating system convention.
func(f*File)Open(namestring)(http.File,error){
fp:=path.Join(f.Path().Name,name)
f2,err:=f.pkging.Open(fp)
iferr!=nil{
returnnil,err
}
returnf2,nil
}
// Path returns the here.Path of the file
func(f*File)Path()here.Path{
returnf.path
}
// Stat returns the FileInfo structure describing file. If there is an error, it will be of type *PathError.