dirs

package
v0.0.0-...-2fb355d Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// These are directories which are static inside the core snap and
	// can never be prefixed as they will be always absolute once we
	// are in the snap confinement environment.
	CoreLibExecDir   = "/usr/lib/snapd"
	CoreSnapMountDir = "/snap"

	// Directory with snap data inside user's home
	UserHomeSnapDir = "snap"

	// LocalInstallBlobTempPrefix is used by local install code:
	// * in daemon to spool the snap file to <SnapBlobDir>/<LocalInstallBlobTempPrefix>*
	// * in snapstate to auto-cleans them up using the same prefix
	LocalInstallBlobTempPrefix = ".local-install-"
)

Variables

View Source
var (
	GlobalRootDir string

	SnapMountDir string

	DistroLibExecDir string

	SnapBlobDir               string
	SnapDataDir               string
	SnapDataHomeGlob          string
	SnapDownloadCacheDir      string
	SnapAppArmorDir           string
	SnapAppArmorAdditionalDir string
	SnapConfineAppArmorDir    string
	SnapSeccompBase           string
	SnapSeccompDir            string
	SnapMountPolicyDir        string
	SnapUdevRulesDir          string
	SnapKModModulesDir        string
	LocaleDir                 string
	SnapMetaDir               string
	SnapdSocket               string
	SnapSocket                string
	SnapRunDir                string
	SnapRunNsDir              string
	SnapRunLockDir            string
	SnapBootstrapRunDir       string

	SnapdMaintenanceFile string

	SnapdStoreSSLCertsDir string

	SnapSeedDir   string
	SnapDeviceDir string

	SnapAssertsDBDir      string
	SnapCookieDir         string
	SnapTrustedAccountKey string
	SnapAssertsSpoolDir   string
	SnapSeqDir            string

	SnapStateFile     string
	SnapSystemKeyFile string

	SnapRepairDir        string
	SnapRepairStateFile  string
	SnapRepairRunDir     string
	SnapRepairAssertsDir string
	SnapRunRepairDir     string

	SnapRollbackDir string

	SnapCacheDir        string
	SnapNamesFile       string
	SnapSectionsFile    string
	SnapCommandsDB      string
	SnapAuxStoreInfoDir string

	SnapBinariesDir     string
	SnapServicesDir     string
	SnapUserServicesDir string
	SnapSystemdConfDir  string
	SnapDesktopFilesDir string
	SnapDesktopIconsDir string

	SnapDBusSessionPolicyDir   string
	SnapDBusSystemPolicyDir    string
	SnapDBusSessionServicesDir string
	SnapDBusSystemServicesDir  string

	SnapModeenvFile   string
	SnapBootAssetsDir string
	SnapFDEDir        string
	SnapSaveDir       string
	SnapDeviceSaveDir string

	CloudMetaDataFile     string
	CloudInstanceDataFile string

	ClassicDir string

	XdgRuntimeDirBase string
	XdgRuntimeDirGlob string

	CompletionHelperInCore string
	CompletersDir          string

	SystemFontsDir            string
	SystemLocalFontsDir       string
	SystemFontconfigCacheDirs []string

	SnapshotsDir string

	ErrtrackerDbDir string
	SysfsDir        string

	FeaturesDir string
)

the various file paths

Functions

func AddRootDirCallback

func AddRootDirCallback(c func(string))

AddRootDirCallback registers a callback for whenever the global root directory (set by SetRootDir) is changed to enable updates to variables in other packages that depend on its location.

func CompleteShPath

func CompleteShPath(base string) string

func FeaturesDirUnder

func FeaturesDirUnder(rootdir string) string

FeaturesDirUnder returns the path to the features dir under rootdir.

func IsCompleteShSymlink(compPath string) bool

func SetRootDir

func SetRootDir(rootdir string)

SetRootDir allows settings a new global root directory, this is useful for e.g. chroot operations

func SnapBlobDirUnder

func SnapBlobDirUnder(rootdir string) string

SnapBlobDirUnder returns the path to the snap blob dir under rootdir.

func SnapBootAssetsDirUnder

func SnapBootAssetsDirUnder(rootdir string) string

SnapBootAssetsDirUnder returns the path to boot assets directory under a rootdir.

func SnapDeviceDirUnder

func SnapDeviceDirUnder(rootdir string) string

SnapDeviceDirUnder returns the path to device directory under rootdir.

func SnapFDEDirUnder

func SnapFDEDirUnder(rootdir string) string

SnapFDEDirUnder returns the path to full disk encryption state directory under rootdir.

func SnapFDEDirUnderSave

func SnapFDEDirUnderSave(savedir string) string

SnapFDEDirUnderSave returns the path to full disk encryption state directory inside the given save tree dir.

func SnapModeenvFileUnder

func SnapModeenvFileUnder(rootdir string) string

SnapModeenvFileUnder returns the path to the modeenv file under rootdir.

func SnapSaveDirUnder

func SnapSaveDirUnder(rootdir string) string

SnapSaveDirUnder returns the path to device save directory under rootdir.

func SnapSeedDirUnder

func SnapSeedDirUnder(rootdir string) string

SnapSeedDirUnder returns the path to the snap seed dir under rootdir.

func SnapStateFileUnder

func SnapStateFileUnder(rootdir string) string

SnapStateFileUnder returns the path to snapd state file under rootdir.

func SnapSystemdConfDirUnder

func SnapSystemdConfDirUnder(rootdir string) string

SnapSystemdConfDirUnder returns the path to the systemd conf dir under rootdir.

func SnapdStateDir

func SnapdStateDir(rootdir string) string

SnapdStateDir returns the path to /var/lib/snapd dir under rootdir.

func StripRootDir

func StripRootDir(dir string) string

StripRootDir strips the custom global root directory from the specified argument.

func SupportsClassicConfinement

func SupportsClassicConfinement() bool

SupportsClassicConfinement returns true if the current directory layout supports classic confinement.

Types

This section is empty.

Jump to

Keyboard shortcuts

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