func (world *World) FilePath() string {
	return world.filePath
}
FilePath returns the path used to open the world
package world
import (
	"errors"
	"os"
	"github.com/midnightfreddie/goleveldb/leveldb"
)
type World struct {
	db       *leveldb.DB
	filePath string
}
func OpenWorld(path string) (World, error) {
	world := World{nil, path}
	var err error
	dbPath := path + "/db"
	fileInfo, err := os.Stat(dbPath)
	if os.IsNotExist(err) {
		return world, errors.New(dbPath + " does not exist. This must be run against a valid world folder.")
	}
	if err != nil {
		return world, err
	}
	if !fileInfo.IsDir() {
		return world, errors.New(dbPath + " is not a directory. This must be run against a valid world folder.")
	}
	world.db, err = leveldb.OpenFile(dbPath, nil)
	if err != nil {
		if world.db != nil {
			_ = world.db.Close()
		}
		return world, err
	}
	return world, nil
}
func (world *World) Close() error {
	err := world.db.Close()
	return err
}