goworld: github.com/xiaonanln/goworld/engine/storage/backend/filesystem Index | Files

package entitystoragefilesystem

import "github.com/xiaonanln/goworld/engine/storage/backend/filesystem"

Index

Package Files

filesystem.go

func OpenDirectory Uses

func OpenDirectory(directory string) (storagecommon.EntityStorage, error)

OpenDirectory opens the directory as filesystem entity storage

type FileSystemEntityStorage Uses

type FileSystemEntityStorage struct {
    // contains filtered or unexported fields
}

FileSystemEntityStorage is an implementation of Entity Storage using filesystem

func (*FileSystemEntityStorage) Close Uses

func (es *FileSystemEntityStorage) Close()

Close the entity storage

func (*FileSystemEntityStorage) Exists Uses

func (es *FileSystemEntityStorage) Exists(typeName string, entityID common.EntityID) (exists bool, err error)

Exists checks if entity is in entity storage

func (*FileSystemEntityStorage) IsEOF Uses

func (es *FileSystemEntityStorage) IsEOF(err error) bool

IsEOF check if the error is an EOF error

func (*FileSystemEntityStorage) List Uses

func (es *FileSystemEntityStorage) List(typeName string) ([]common.EntityID, error)

List retrives all entity IDs in entity storage of specified type

func (*FileSystemEntityStorage) Read Uses

func (es *FileSystemEntityStorage) Read(typeName string, entityID common.EntityID) (interface{}, error)

Read reads entity data from entity storage

func (*FileSystemEntityStorage) Write Uses

func (es *FileSystemEntityStorage) Write(typeName string, entityID common.EntityID, data interface{}) error

Write writes entity data to entity storage

Package entitystoragefilesystem imports 10 packages (graph) and is imported by 1 packages. Updated 2017-08-27. Refresh now. Tools for package owners.