Documentation ¶
Index ¶
- Constants
- Variables
- func AddRootDirCallback(c func(string))
- func CompleteShPath(base string) string
- func FeaturesDirUnder(rootdir string) string
- func IsCompleteShSymlink(compPath string) bool
- func SetRootDir(rootdir string)
- func SnapBlobDirUnder(rootdir string) string
- func SnapBootAssetsDirUnder(rootdir string) string
- func SnapModeenvFileUnder(rootdir string) string
- func SnapSeedDirUnder(rootdir string) string
- func SnapStateFileUnder(rootdir string) string
- func SnapSystemdConfDirUnder(rootdir string) string
- func SnapdStateDir(rootdir string) string
- func StripRootDir(dir string) string
- func SupportsClassicConfinement() bool
Constants ¶
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 ¶
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 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 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 FeaturesDirUnder ¶
FeaturesDirUnder returns the path to the features dir under rootdir.
func IsCompleteShSymlink ¶
func SetRootDir ¶
func SetRootDir(rootdir string)
SetRootDir allows settings a new global root directory, this is useful for e.g. chroot operations
func SnapBlobDirUnder ¶
SnapBlobDirUnder returns the path to the snap blob dir under rootdir.
func SnapBootAssetsDirUnder ¶
SnapBootAssetsDirUnder returns the path to boot assets directory under a rootdir.
func SnapModeenvFileUnder ¶
SnapModeenvFileUnder returns the path to the modeenv file under rootdir.
func SnapSeedDirUnder ¶
SnapSeedDirUnder returns the path to the snap seed dir under rootdir.
func SnapStateFileUnder ¶
SnapStateFileUnder returns the path to snapd state file under rootdir.
func SnapSystemdConfDirUnder ¶
SnapSystemdConfDirUnder returns the path to the systemd conf dir under rootdir.
func SnapdStateDir ¶
SnapdStateDir returns the path to /var/lib/snapd dir under rootdir.
func StripRootDir ¶
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.