You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dirent.go
    path of file: ./repos/kubeedge/vendor/github.com/karrick/godirwalk
    
    the code of the file until where you have to start completion: package godirwalk

import (
	"os"
	"path/filepath"
)

// Dirent stores the name and file system mode type of discovered file sy
    
func NewDirent(osPathname string) (*Dirent, error) {
	modeType, err := modeType(osPathname)
	if err != nil {
		return nil, err
	}
	return &Dirent{
		name:     filepath.Base(osPathname),
		path:     filepath.Dir(osPathname),
		modeType: modeType,
	}, nil
}