paths

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 11

README

paths

paths provides centralized filesystem path helpers and constants for the application's directory structure.

Types

Type Description
FileSystemPath Wraps a path string with String() and Is() methods

Functions

Function Description
Application() FileSystemPath Current working directory (application root)
Data() FileSystemPath Path to the data/ directory
Config() FileSystemPath Path to the config directory
Defaults() FileSystemPath Path to the defaults directory
Database() FileSystemPath Path to the database directory
Logs() FileSystemPath Path to the logs directory
Backups() FileSystemPath Path to the backups directory
Dumps() FileSystemPath Path to the dumps directory
Res() FileSystemPath Path to the resources directory
Images() FileSystemPath Path to image resources
HTML() FileSystemPath Path to HTML templates
HTMLTemplates() FileSystemPath Path to HTML templates (alias)
HTMLPage(name string) string Full path to a named HTML page
HTMLTemplate() string Path to the main templates file
Seperator() string OS path separator

Example

import "github.com/mt1976/frantic-core/paths"

func main() {
    fmt.Println("App root:", paths.Application().String())
    fmt.Println("Config:", paths.Config().String())
    fmt.Println("Database:", paths.Database().String())
    fmt.Println("Logs:", paths.Logs().String())
}

Documentation

Overview

Package paths centralizes filesystem path helpers and constants.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLPage

func HTMLPage(in string) string

func HTMLTemplate

func HTMLTemplate() string

func Seperator

func Seperator() string

Types

type FileSystemPath

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

func Application

func Application() FileSystemPath

func Backups

func Backups() FileSystemPath

func Config

func Config() FileSystemPath

func Data

func Data() FileSystemPath

func Database

func Database() FileSystemPath

func Defaults

func Defaults() FileSystemPath

func Dumps

func Dumps() FileSystemPath

func HTML

func HTML() FileSystemPath

func HTMLTemplates

func HTMLTemplates() FileSystemPath

func Images

func Images() FileSystemPath

func Logs

func Logs() FileSystemPath

func Res

func Res() FileSystemPath

func (*FileSystemPath) Is

func (FileSystemPath) String

func (f FileSystemPath) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL