# Functions
AddSlash adds a slash to the end of paths if they don't already have one.
CachePath returns the directory that Incus should its cache under.
CanonicalNetworkAddress parses the given network address and returns a string of the form "host:port", possibly filling it with the default port if it's missing.
CanonicalNetworkAddressFromAddressAndPort returns a network address from separate address and port values.
DirCopy copies a directory recursively, overwriting the target if it exists.
FileCopy copies a file, overwriting the target if it exists.
FileMove tries to move a file by using os.Rename, if that fails it tries to copy the file and remove the source.
IsAddressCovered detects if network address1 is actually covered by address2, in the sense that they are either the same address or address2 is specified using a wildcard with the same port of address1.
IsDir returns true if the given path is a directory.
IsUnixSocket returns true if the given path is either a Unix socket or a symbolic link pointing at a Unix socket.
IsWildCardAddress returns whether the given address is a wildcard.
JoinTokenDecode decodes a base64 and JSON encoded join token.
LoadCert reads the server certificate from the given var dir.
LoadClusterCert reads the cluster certificate from the given var dir.
LoadServerCert reads the server certificate from the given var dir.
LogPath returns the directory that Incus should put logs under.
No description provided by the author
NetworkInterfaceAddress returns the first global unicast address of any of the system network interfaces.
PathIsEmpty checks if the given path is empty.
RandomHexString returns a random string of hexadecimal characters.
RenderTemplate renders a pongo2 template.
RunPath returns the directory that Incus should put runtime data under.
VarPath returns the provided path elements joined by a slash and appended to the end of $INCUS_DIR, which defaults to /var/lib/incus.
WriteCert writes the given material to the appropriate certificate files in the given directory.
# Constants
PoolTypeAny represents any storage pool (local or remote).
PoolTypeLocal represents local storage pools.
PoolTypeRemote represents remote storage pools.
# Type aliases
PoolType represents a type of storage pool (local, remote or any).