package
0.0.0-20250304205905-b47799d07ddf
Repository: https://github.com/aws/amazon-ssm-agent.git
Documentation: pkg.go.dev

# Packages

Package artifact contains utilities for working downloading files.
No description provided by the author
TODO: This package is a start to migration of the fileutil code to be inside an interface for better mocking.
No description provided by the author

# Functions

AppendToFile appends content to file.
BuildPath joins the orchestration directory path with valid components.
BuildS3Path joins the root directory path with valid components.
BuildSafePath joins the directory, but returns the root directory if the subpaths attempt to recurse above the provided root.
CollectFilesAndRebase collects all files and directories of the *sourceDir* changing their relative path to be rooted in *rebaseToDir*.
CreateFile creates a file with the given name.
CreateTempDir creates a new temporary directory in the directory dir with a name beginning with prefix.
No description provided by the author
DeleteDirectory deletes a directory and all its content.
DeleteFile deletes the specified file.
Exists returns true if the given file exists, false otherwise, ignoring any underlying error.
GetDirectoryNames returns the names of all directories under a give srcPath.
GetDirectoryNamesUnsortedOlderThan returns directory name unsorted ioutil.ReadDir uses sorting to sort the directory names if date value passed in olderThan param, this function returns all files older than the passed time.
GetDiskSpaceInfo returns DiskSpaceInfo with available, free, and total bytes from system disk space.
No description provided by the author
GetFileModificationTime returns the modification time of the file.
GetFileNames returns the names of all non-directories under a give srcPath.
GetFileNamesUnsortedLaterThan returns directory name unsorted ioutil.ReadDir uses sorting to sort the directory names if date value passed in laterThan param, this function returns all files after the passed time.
Harden the provided path with non-inheriting ACL for admin access only.
HardenDataFolder sets permission of %PROGRAM_DATA% folder for Windows.
HardenedWriteFile calls ioutil.WriteFile and guarantees a hardened permission control.
IsDirectory returns true or false depending if given srcPath is directory or not.
IsDirEmpty returns true if the given directory is empty else it returns false.
IsFile returns true or false depending if given srcPath is a regular file or not.
LocalFileExist returns true if the given file exists, false otherwise.
MakeDirs create the directories along the path if missing.
MakeDirsWithExecuteAccess create the directories along the path if missing.
MoveAndRenameFile moves a file from the srcPath directory to dstPath directory and gives it a new name.
MoveFile moves file from srcPath directory to dstPath directory only if both directories exist.
MoveFiles moves all files and directories from *sourceDir* to *destDir*.
ReadAllText reads all content from the specified file.
ReadDir returns files within the given location.
RecursivelyHarden the files and directory under the specified path.
Uncompress untar the installation package.
Unzip unzips the installation package (using platform agnostic zip functionality) For platform specific implementation that uses tar.gz on Linux, use Uncompress.
WriteAllText writes all text content to the specified file.
WriteIntoFileWithPermissions writes into file with given file mode permissions.
WriteIntoFileWithPermissionsExtended writes into file with given file mode permissions.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

DiskSpaceInfo stores the available, free, and total bytes.

# Type aliases

No description provided by the author