Documentation
¶
Index ¶
- func CreateTruncateFile(filePath string) (os.File, error)
- func ExistingFilesSet(inputPath string, fiterFileExtension string) (map[string]struct{}, error)
- func GetOrCreateDirectory(pathToMapsDirectory string) error
- func ListFiles(inputPath string, filterFileExtension string) ([]string, error)
- func ReadOrCreateFile(filepath string) (os.File, []byte, error)
- func SaveReplayJSONFileToDrive(replayString string, replayFile string, absolutePathOutputDirectory string) bool
- func UnmarshalJSONMapping(pathToMappingFile string) (map[string]any, error)
- func UnmarshalJsonFile(filepath string, mapToPopulate *map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTruncateFile ¶
CreateTruncateFile receives a filepath and creates a file if it doesn't exist.
func ExistingFilesSet ¶
ExistingFilesSet creates a set of existing files in a directory.
func GetOrCreateDirectory ¶
GetOrCreateDirectory receives the path to the maps directory and creates it if it doesn't exist.
func ListFiles ¶
ListFiles creates a slice of filepaths from a give input directory based filtering supplied fileExtension
func ReadOrCreateFile ¶
ReadOrCreateFile receives a filepath, creates a file if it doesn't exist. Otherwise it reads the file and returns the file and its contents.
func SaveReplayJSONFileToDrive ¶
func SaveReplayJSONFileToDrive( replayString string, replayFile string, absolutePathOutputDirectory string) bool
SaveReplayJSONFileToDrive is a helper function that takes the json string of a StarCraft II replay and writes it to drive.
func UnmarshalJSONMapping ¶
UnmarshalJSONMapping wraps around unmarshalLocaleFile and returns an empty map[string]any if it fails to unmarshal the original locale mapping file.
func UnmarshalJsonFile ¶
UnmarshalJsonFile deals with every possible opening and unmarshalling problem that might occur when unmarshalling a localization file supplied by: https://github.com/Kaszanas/SC2MapLocaleExtractor
Types ¶
This section is empty.