Documentation
¶
Index ¶
- Variables
- func DeleteFileByPath(path string, verbose bool) (err error)
- func GetFileByOsFile(osFile *os.File) (file filesinterfaces.File, err error)
- func ReadFileAsString(path string) (content string, err error)
- func WriteStringToFile(path string, content string, verbose bool) (err error)
- type CommandExecutorDirectory
- func GetCommandExecutorDirectoryByPath(commandExecutor commandexecutorinterfaces.CommandExecutor, path string) (c *CommandExecutorDirectory, err error)
- func GetLocalCommandExecutorDirectoryByPath(path string) (c *CommandExecutorDirectory, err error)
- func NewCommandExecutorDirectory(commandExecutor commandexecutorinterfaces.CommandExecutor) (c *CommandExecutorDirectory, err error)
- func (c *CommandExecutorDirectory) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
- func (c *CommandExecutorDirectory) CopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool) (err error)
- func (c *CommandExecutorDirectory) Create(verbose bool) (err error)
- func (c *CommandExecutorDirectory) CreateSubDirectory(subDirectoryName string, verbose bool) (createdSubDirectory filesinterfaces.Directory, err error)
- func (c *CommandExecutorDirectory) Delete(verbose bool) (err error)
- func (c *CommandExecutorDirectory) Exists(verbose bool) (exists bool, err error)
- func (c *CommandExecutorDirectory) GetBaseName() (baseName string, err error)
- func (c *CommandExecutorDirectory) GetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor, err error)
- func (c *CommandExecutorDirectory) GetCommandExecutorAndDirPath() (commandExecutor commandexecutorinterfaces.CommandExecutor, dirPath string, ...)
- func (c *CommandExecutorDirectory) GetCommandExecutorAndDirPathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, dirPath string, ...)
- func (c *CommandExecutorDirectory) GetDirName() (parentPath string, err error)
- func (c *CommandExecutorDirectory) GetDirPath() (dirPath string, err error)
- func (c *CommandExecutorDirectory) GetFileInDirectory(pathToFile ...string) (file filesinterfaces.File, err error)
- func (c *CommandExecutorDirectory) GetHostDescription() (hostDescription string, err error)
- func (c *CommandExecutorDirectory) GetLocalPath() (localPath string, err error)
- func (c *CommandExecutorDirectory) GetParentDirectory() (parent filesinterfaces.Directory, err error)
- func (c *CommandExecutorDirectory) GetPath() (path string, err error)
- func (c *CommandExecutorDirectory) GetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory, err error)
- func (c *CommandExecutorDirectory) IsLocalDirectory() (isLocalDirectory bool, err error)
- func (c *CommandExecutorDirectory) ListFilePaths(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (filePaths []string, err error)
- func (c *CommandExecutorDirectory) ListFiles(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (files []filesinterfaces.File, err error)
- func (c *CommandExecutorDirectory) ListSubDirectories(options *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory, err error)
- func (c *CommandExecutorDirectory) SetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor) (err error)
- func (c *CommandExecutorDirectory) SetDirPath(dirPath string) (err error)
- type CommandExecutorFile
- func GetCommandExecutorFileByPath(commandExector commandexecutorinterfaces.CommandExecutor, path string) (commandExecutorFile *CommandExecutorFile, err error)
- func GetLocalCommandExecutorFileByFile(file filesinterfaces.File, verbose bool) (commandExecutorFile *CommandExecutorFile, err error)
- func GetLocalCommandExecutorFileByPath(localPath string) (commandExecutorFile *CommandExecutorFile, err error)
- func MustGetCommandExecutorFileByPath(commandExector commandexecutorinterfaces.CommandExecutor, path string) (commandExecutorFile *CommandExecutorFile)
- func MustGetLocalCommandExecutorFileByFile(file filesinterfaces.File, verbose bool) (commandExecutorFile *CommandExecutorFile)
- func MustGetLocalCommandExecutorFileByPath(localPath string) (commandExecutorFile *CommandExecutorFile)
- func NewCommandExecutorFile() (c *CommandExecutorFile)
- func (c *CommandExecutorFile) AppendBytes(toWrite []byte, verbose bool) (err error)
- func (c *CommandExecutorFile) AppendString(toWrite string, verbose bool) (err error)
- func (c *CommandExecutorFile) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
- func (c *CommandExecutorFile) Chown(options *parameteroptions.ChownOptions) (err error)
- func (c *CommandExecutorFile) CopyToFile(destFile filesinterfaces.File, verbose bool) (err error)
- func (c *CommandExecutorFile) Create(verbose bool) (err error)
- func (c *CommandExecutorFile) Delete(verbose bool) (err error)
- func (c *CommandExecutorFile) Exists(verbose bool) (exists bool, err error)
- func (c *CommandExecutorFile) GetAccessPermissions() (permissions int, err error)
- func (c *CommandExecutorFile) GetAccessPermissionsString() (permissionsString string, err error)
- func (c *CommandExecutorFile) GetBaseName() (baseName string, err error)
- func (c *CommandExecutorFile) GetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor, err error)
- func (c *CommandExecutorFile) GetCommandExecutorAndFilePath() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, ...)
- func (c *CommandExecutorFile) GetCommandExecutorAndFilePathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, ...)
- func (c *CommandExecutorFile) GetDeepCopy() (deepCopy filesinterfaces.File)
- func (c *CommandExecutorFile) GetFilePath() (filePath string, err error)
- func (c *CommandExecutorFile) GetHostDescription() (hostDescription string, err error)
- func (c *CommandExecutorFile) GetLocalPath() (localPath string, err error)
- func (c *CommandExecutorFile) GetLocalPathOrEmptyStringIfUnset() (localPath string, err error)
- func (c *CommandExecutorFile) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
- func (c *CommandExecutorFile) GetPath() (path string, err error)
- func (c *CommandExecutorFile) GetPathAndHostDescription() (path string, hostDescription string, err error)
- func (c *CommandExecutorFile) GetSizeBytes() (fileSize int64, err error)
- func (c *CommandExecutorFile) GetUriAsString() (uri string, err error)
- func (c *CommandExecutorFile) IsRunningOnLocalhost() (isRunningOnLocalhost bool, err error)
- func (c *CommandExecutorFile) MoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File, err error)
- func (c *CommandExecutorFile) MustAppendBytes(toWrite []byte, verbose bool)
- func (c *CommandExecutorFile) MustAppendString(toWrite string, verbose bool)
- func (c *CommandExecutorFile) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
- func (c *CommandExecutorFile) MustChown(options *parameteroptions.ChownOptions)
- func (c *CommandExecutorFile) MustCopyToFile(destFile filesinterfaces.File, verbose bool)
- func (c *CommandExecutorFile) MustCreate(verbose bool)
- func (c *CommandExecutorFile) MustDelete(verbose bool)
- func (c *CommandExecutorFile) MustExists(verbose bool) (exist bool)
- func (c *CommandExecutorFile) MustGetAccessPermissions() (permissions int)
- func (c *CommandExecutorFile) MustGetAccessPermissionsString() (permissionString string)
- func (c *CommandExecutorFile) MustGetBaseName() (baseName string)
- func (c *CommandExecutorFile) MustGetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor)
- func (c *CommandExecutorFile) MustGetCommandExecutorAndFilePath() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string)
- func (c *CommandExecutorFile) MustGetCommandExecutorAndFilePathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, ...)
- func (c *CommandExecutorFile) MustGetFilePath() (filePath string)
- func (c *CommandExecutorFile) MustGetHostDescription() (hostDescription string)
- func (c *CommandExecutorFile) MustGetLocalPath() (localPath string)
- func (c *CommandExecutorFile) MustGetLocalPathOrEmptyStringIfUnset() (localPath string)
- func (c *CommandExecutorFile) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)
- func (c *CommandExecutorFile) MustGetPath() (path string)
- func (c *CommandExecutorFile) MustGetPathAndHostDescription() (path string, hostDescription string)
- func (c *CommandExecutorFile) MustGetSizeBytes() (fileSize int64)
- func (c *CommandExecutorFile) MustGetUriAsString() (uri string)
- func (c *CommandExecutorFile) MustIsRunningOnLocalhost() (isRunningOnLocalhost bool)
- func (c *CommandExecutorFile) MustMoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File)
- func (c *CommandExecutorFile) MustReadAsBytes() (content []byte)
- func (c *CommandExecutorFile) MustReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte)
- func (c *CommandExecutorFile) MustSetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor)
- func (c *CommandExecutorFile) MustSetFilePath(filePath string)
- func (c *CommandExecutorFile) MustTruncate(newSizeBytes int64, verbose bool)
- func (c *CommandExecutorFile) MustWriteBytes(toWrite []byte, verbose bool)
- func (c *CommandExecutorFile) ReadAsBytes() (content []byte, err error)
- func (c *CommandExecutorFile) ReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte, err error)
- func (c *CommandExecutorFile) SecurelyDelete(ctx context.Context) (err error)
- func (c *CommandExecutorFile) SetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor) (err error)
- func (c *CommandExecutorFile) SetFilePath(filePath string) (err error)
- func (c *CommandExecutorFile) String() string
- func (c *CommandExecutorFile) Truncate(newSizeBytes int64, verbose bool) (err error)
- func (c *CommandExecutorFile) WriteBytes(toWrite []byte, verbose bool) (err error)
- type DirectoriesService
- type DirectoryBase
- func (d *DirectoryBase) CheckExists(ctx context.Context) (err error)
- func (d *DirectoryBase) CreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File, err error)
- func (d *DirectoryBase) CreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile filesinterfaces.File, err error)
- func (d *DirectoryBase) DeleteFilesMatching(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (err error)
- func (d *DirectoryBase) FileInDirectoryExists(verbose bool, path ...string) (fileExists bool, err error)
- func (d *DirectoryBase) GetFilePathInDirectory(path ...string) (filePath string, err error)
- func (d *DirectoryBase) GetParentDirectoryForBaseClass() (parentDirectoryForBaseClass filesinterfaces.Directory, err error)
- func (d *DirectoryBase) GetPathAndHostDescription() (path string, hostDescription string, err error)
- func (d *DirectoryBase) ListFilePaths(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (filePaths []string, err error)
- func (d *DirectoryBase) ListSubDirectoryPaths(options *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string, err error)
- func (d *DirectoryBase) MustCheckExists(ctx context.Context)
- func (d *DirectoryBase) MustCreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File)
- func (d *DirectoryBase) MustCreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile filesinterfaces.File)
- func (d *DirectoryBase) MustFileInDirectoryExists(verbose bool, path ...string) (fileExists bool)
- func (d *DirectoryBase) MustGetFilePathInDirectory(path ...string) (filePath string)
- func (d *DirectoryBase) MustGetParentDirectoryForBaseClass() (parentDirectoryForBaseClass filesinterfaces.Directory)
- func (d *DirectoryBase) MustGetPathAndHostDescription() (path string, hostDescription string)
- func (d *DirectoryBase) MustListSubDirectoryPaths(options *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string)
- func (d *DirectoryBase) MustReadFileInDirectoryAsInt64(path ...string) (value int64)
- func (d *DirectoryBase) MustReadFileInDirectoryAsLines(path ...string) (content []string)
- func (d *DirectoryBase) MustReadFileInDirectoryAsString(path ...string) (content string)
- func (d *DirectoryBase) MustReadFirstLineOfFileInDirectoryAsString(path ...string) (firstLine string)
- func (d *DirectoryBase) MustSetParentDirectoryForBaseClass(parentDirectoryForBaseClass filesinterfaces.Directory)
- func (d *DirectoryBase) MustWriteBytesToFile(content []byte, verbose bool, path ...string) (writtenFile filesinterfaces.File)
- func (d *DirectoryBase) MustWriteStringToFileInDirectory(content string, verbose bool, path ...string) (writtenFile filesinterfaces.File)
- func (d *DirectoryBase) ReadFileInDirectoryAsInt64(path ...string) (value int64, err error)
- func (d *DirectoryBase) ReadFileInDirectoryAsLines(path ...string) (content []string, err error)
- func (d *DirectoryBase) ReadFileInDirectoryAsString(path ...string) (content string, err error)
- func (d *DirectoryBase) ReadFirstLineOfFileInDirectoryAsString(path ...string) (firstLine string, err error)
- func (d *DirectoryBase) SetParentDirectoryForBaseClass(parentDirectoryForBaseClass filesinterfaces.Directory) (err error)
- func (c *DirectoryBase) WriteBytesToFile(content []byte, verbose bool, path ...string) (writtenFile filesinterfaces.File, err error)
- func (d *DirectoryBase) WriteStringToFileInDirectory(content string, verbose bool, path ...string) (writtenFile filesinterfaces.File, err error)
- type FileBase
- func (f *FileBase) AppendLine(line string, verbose bool) (err error)
- func (f *FileBase) CheckIsLocalFile(verbose bool) (err error)
- func (f *FileBase) ContainsLine(line string) (containsLine bool, err error)
- func (f *FileBase) CreateParentDirectory(verbose bool) (err error)
- func (f *FileBase) EnsureEndsWithLineBreak(verbose bool) (err error)
- func (f *FileBase) EnsureLineInFile(line string, verbose bool) (err error)
- func (xxx *FileBase) GetCreationDateByFileName(verbose bool) (creationDate *time.Time, err error)
- func (f *FileBase) GetFileTypeDescription(verbose bool) (fileTypeDescription string, err error)
- func (f *FileBase) GetMimeType(verbose bool) (mimeType string, err error)
- func (f *FileBase) GetNumberOfLinesWithPrefix(prefix string, trimLines bool) (nLines int, err error)
- func (f *FileBase) GetNumberOfNonEmptyLines() (nLines int, err error)
- func (f *FileBase) GetParentDirectoryPath() (parentDirectoryPath string, err error)
- func (f *FileBase) GetParentFileForBaseClass() (parentFileForBaseClass filesinterfaces.File, err error)
- func (f *FileBase) GetPathAndHostDescription() (path string, hostDescription string, err error)
- func (f *FileBase) GetSha256Sum() (sha256sum string, err error)
- func (f *FileBase) GetTextBlocks(verbose bool) (textBlocks []string, err error)
- func (f *FileBase) GetValueAsInt(key string) (value int, err error)
- func (f *FileBase) GetValueAsString(key string) (value string, err error)
- func (f *FileBase) IsContentEqualByComparingSha256Sum(otherFile filesinterfaces.File, verbose bool) (isEqual bool, err error)
- func (f *FileBase) IsEmptyFile() (isEmtpyFile bool, err error)
- func (f *FileBase) IsLocalFile(verbose bool) (isLocalFile bool, err error)
- func (f *FileBase) IsMatchingSha256Sum(sha256sum string) (isMatching bool, err error)
- func (f *FileBase) IsPgpEncrypted(verbose bool) (isEncrypted bool, err error)
- func (f *FileBase) IsYYYYmmdd_HHMMSSPrefix() (hasDatePrefix bool, err error)
- func (f *FileBase) MustAppendLine(line string, verbose bool)
- func (f *FileBase) MustCheckIsLocalFile(verbose bool)
- func (f *FileBase) MustContainsLine(line string) (containsLine bool)
- func (f *FileBase) MustCreateParentDirectory(verbose bool)
- func (f *FileBase) MustEnsureEndsWithLineBreak(verbose bool)
- func (f *FileBase) MustEnsureLineInFile(line string, verbose bool)
- func (f *FileBase) MustGetCreationDateByFileName(verbose bool) (creationDate *time.Time)
- func (f *FileBase) MustGetFileTypeDescription(verbose bool) (fileTypeDescription string)
- func (f *FileBase) MustGetMimeType(verbose bool) (mimeType string)
- func (f *FileBase) MustGetNumberOfLinesWithPrefix(prefix string, trimLines bool) (nLines int)
- func (f *FileBase) MustGetNumberOfNonEmptyLines() (nLines int)
- func (f *FileBase) MustGetParentDirectoryPath() (parentDirectoryPath string)
- func (f *FileBase) MustGetParentFileForBaseClass() (parentFileForBaseClass filesinterfaces.File)
- func (f *FileBase) MustGetPathAndHostDescription() (path string, hostDescription string)
- func (f *FileBase) MustGetSha256Sum() (sha256sum string)
- func (f *FileBase) MustGetTextBlocks(verbose bool) (textBlocks []string)
- func (f *FileBase) MustGetValueAsInt(key string) (value int)
- func (f *FileBase) MustGetValueAsString(key string) (value string)
- func (f *FileBase) MustIsContentEqualByComparingSha256Sum(otherFile filesinterfaces.File, verbose bool) (isEqual bool)
- func (f *FileBase) MustIsEmptyFile() (isEmtpyFile bool)
- func (f *FileBase) MustIsLocalFile(verbose bool) (isLocalFile bool)
- func (f *FileBase) MustIsMatchingSha256Sum(sha256sum string) (isMatching bool)
- func (f *FileBase) MustIsPgpEncrypted(verbose bool) (isEncrypted bool)
- func (f *FileBase) MustIsYYYYmmdd_HHMMSSPrefix() (hasDatePrefix bool)
- func (f *FileBase) MustPrintContentOnStdout()
- func (f *FileBase) MustReadAsBool() (boolValue bool)
- func (f *FileBase) MustReadAsFloat64() (content float64)
- func (f *FileBase) MustReadAsInt() (readValue int)
- func (f *FileBase) MustReadAsInt64() (readValue int64)
- func (f *FileBase) MustReadAsLines() (contentLines []string)
- func (f *FileBase) MustReadAsLinesWithoutComments() (contentLines []string)
- func (f *FileBase) MustReadAsString() (content string)
- func (f *FileBase) MustReadAsTimeTime() (date *time.Time)
- func (f *FileBase) MustReadFirstLine() (firstLine string)
- func (f *FileBase) MustReadFirstLineAndTrimSpace() (firstLine string)
- func (f *FileBase) MustReadLastCharAsString() (lastChar string)
- func (f *FileBase) MustRemoveLinesWithPrefix(prefix string, verbose bool)
- func (f *FileBase) MustReplaceLineAfterLine(lineToFind string, replaceLineAfterWith string, verbose bool) (changeSummary *changesummary.ChangeSummary)
- func (f *FileBase) MustSetParentFileForBaseClass(parentFileForBaseClass filesinterfaces.File)
- func (f *FileBase) MustSortBlocksInFile(verbose bool)
- func (f *FileBase) MustTrimSpacesAtBeginningOfFile(verbose bool)
- func (f *FileBase) MustWriteInt64(toWrite int64, verbose bool)
- func (f *FileBase) MustWriteLines(linesToWrite []string, verbose bool)
- func (f *FileBase) MustWriteString(toWrite string, verbose bool)
- func (f *FileBase) MustWriteTextBlocks(textBlocks []string, verbose bool)
- func (f *FileBase) PrintContentOnStdout() (err error)
- func (f *FileBase) ReadAsBool() (boolValue bool, err error)
- func (f *FileBase) ReadAsFloat64() (content float64, err error)
- func (f *FileBase) ReadAsInt() (readValue int, err error)
- func (f *FileBase) ReadAsInt64() (readValue int64, err error)
- func (f *FileBase) ReadAsLines() (contentLines []string, err error)
- func (f *FileBase) ReadAsLinesWithoutComments() (contentLines []string, err error)
- func (f *FileBase) ReadAsString() (content string, err error)
- func (f *FileBase) ReadAsTimeTime() (date *time.Time, err error)
- func (f *FileBase) ReadFirstLine() (firstLine string, err error)
- func (f *FileBase) ReadFirstLineAndTrimSpace() (firstLine string, err error)
- func (f *FileBase) ReadLastCharAsString() (lastChar string, err error)
- func (f *FileBase) RemoveLinesWithPrefix(prefix string, verbose bool) (err error)
- func (f *FileBase) ReplaceLineAfterLine(lineToFind string, replaceLineAfterWith string, verbose bool) (changeSummary *changesummary.ChangeSummary, err error)
- func (f *FileBase) SetParentFileForBaseClass(parentFileForBaseClass filesinterfaces.File) (err error)
- func (f *FileBase) SortBlocksInFile(verbose bool) (err error)
- func (f *FileBase) TrimSpacesAtBeginningOfFile(verbose bool) (err error)
- func (f *FileBase) WriteInt64(toWrite int64, verbose bool) (err error)
- func (f *FileBase) WriteLines(linesToWrite []string, verbose bool) (err error)
- func (f *FileBase) WriteString(toWrite string, verbose bool) (err error)
- func (f *FileBase) WriteTextBlocks(textBlocks []string, verbose bool) (err error)
- type FileInfo
- func (f *FileInfo) GetPath() (path string, err error)
- func (f *FileInfo) GetPathAndSizeBytes() (path string, sizeBytes int64, err error)
- func (f *FileInfo) GetSizeBytes() (sizeBytes int64, err error)
- func (f *FileInfo) SetPath(path string) (err error)
- func (f *FileInfo) SetSizeBytes(sizeBytes int64) (err error)
- type FilesService
- type LocalDirectory
- func (l *LocalDirectory) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
- func (l *LocalDirectory) CopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool) (err error)
- func (l *LocalDirectory) CopyContentToLocalDirectory(destDirectory *LocalDirectory, verbose bool) (err error)
- func (l *LocalDirectory) Create(verbose bool) (err error)
- func (l *LocalDirectory) CreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File, err error)
- func (l *LocalDirectory) CreateFilesInDirectory(filesToCreate []string, verbose bool) (createdFiles []filesinterfaces.File, err error)
- func (l *LocalDirectory) CreateSubDirectory(subDirName string, verbose bool) (createdSubDir filesinterfaces.Directory, err error)
- func (l *LocalDirectory) Delete(verbose bool) (err error)
- func (l *LocalDirectory) Exists(verbose bool) (exists bool, err error)
- func (l *LocalDirectory) GetBaseName() (baseName string, err error)
- func (l *LocalDirectory) GetDirName() (parentPath string, err error)
- func (l *LocalDirectory) GetFileInDirectory(path ...string) (file filesinterfaces.File, err error)
- func (l *LocalDirectory) GetFileInDirectoryAsLocalFile(filePath ...string) (localFile *LocalFile, err error)
- func (l *LocalDirectory) GetHostDescription() (hostDescription string, err error)
- func (l *LocalDirectory) GetLocalPath() (localPath string, err error)
- func (l *LocalDirectory) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
- func (l *LocalDirectory) GetPath() (dirPath string, err error)
- func (l *LocalDirectory) GetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory, err error)
- func (l *LocalDirectory) GetSubDirectoryAndLocalPath(path ...string) (subDirectory filesinterfaces.Directory, subDirectoryPath string, err error)
- func (l *LocalDirectory) IsEmptyDirectory(verbose bool) (isEmpty bool, err error)
- func (l *LocalDirectory) IsLocalDirectory() (isLocalDirectory bool, err error)
- func (l *LocalDirectory) ListFilePaths(ctx context.Context, listOptions *parameteroptions.ListFileOptions) (filePathList []string, err error)
- func (l *LocalDirectory) ListFiles(ctx context.Context, options *parameteroptions.ListFileOptions) (files []filesinterfaces.File, err error)
- func (l *LocalDirectory) ListSubDirectories(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory, err error)
- func (l *LocalDirectory) ListSubDirectoriesAsAbsolutePaths(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string, err error)
- func (l *LocalDirectory) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
- func (l *LocalDirectory) MustCopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool)
- func (l *LocalDirectory) MustCopyContentToLocalDirectory(destDirectory *LocalDirectory, verbose bool)
- func (l *LocalDirectory) MustCreate(verbose bool)
- func (l *LocalDirectory) MustCreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File)
- func (l *LocalDirectory) MustCreateFilesInDirectory(filesToCreate []string, verbose bool) (createdFiles []filesinterfaces.File)
- func (l *LocalDirectory) MustCreateSubDirectory(subDirName string, verbose bool) (createdSubDir filesinterfaces.Directory)
- func (l *LocalDirectory) MustDelete(verbose bool)
- func (l *LocalDirectory) MustExists(verbose bool) (exists bool)
- func (l *LocalDirectory) MustGetBaseName() (baseName string)
- func (l *LocalDirectory) MustGetDirName() (dirName string)
- func (l *LocalDirectory) MustGetFileInDirectory(path ...string) (file filesinterfaces.File)
- func (l *LocalDirectory) MustGetFileInDirectoryAsLocalFile(filePath ...string) (localFile *LocalFile)
- func (l *LocalDirectory) MustGetHostDescription() (hostDescription string)
- func (l *LocalDirectory) MustGetLocalPath() (localPath string)
- func (l *LocalDirectory) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)
- func (l *LocalDirectory) MustGetPath() (dirPath string)
- func (l *LocalDirectory) MustGetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory)
- func (l *LocalDirectory) MustGetSubDirectoryAndLocalPath(path ...string) (subDirectory filesinterfaces.Directory, subDirectoryPath string)
- func (l *LocalDirectory) MustIsEmptyDirectory(verbose bool) (isEmpty bool)
- func (l *LocalDirectory) MustIsLocalDirectory() (isLocalDirectory bool)
- func (l *LocalDirectory) MustListSubDirectories(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory)
- func (l *LocalDirectory) MustListSubDirectoriesAsAbsolutePaths(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string)
- func (l *LocalDirectory) MustSetLocalPath(localPath string)
- func (l *LocalDirectory) MustSubDirectoryExists(subDirName string, verbose bool) (subDirExists bool)
- func (l *LocalDirectory) SetLocalPath(localPath string) (err error)
- func (l *LocalDirectory) SubDirectoryExists(subDirName string, verbose bool) (subDirExists bool, err error)
- type LocalFile
- func GetLocalFileByFile(inputFile filesinterfaces.File) (localFile *LocalFile, err error)
- func GetLocalFileByPath(localPath string) (l *LocalFile, err error)
- func MustGetLocalFileByFile(inputFile filesinterfaces.File) (localFile *LocalFile)
- func MustGetLocalFileByPath(localPath string) (l *LocalFile)
- func MustNewLocalFileByPath(localPath string) (l *LocalFile)
- func NewLocalFile() (l *LocalFile)
- func NewLocalFileByPath(localPath string) (l *LocalFile, err error)
- func (l *LocalFile) AppendBytes(toWrite []byte, verbose bool) (err error)
- func (l *LocalFile) AppendString(toWrite string, verbose bool) (err error)
- func (l *LocalFile) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
- func (l *LocalFile) Chown(options *parameteroptions.ChownOptions) (err error)
- func (l *LocalFile) CopyToFile(destFile filesinterfaces.File, verbose bool) (err error)
- func (l *LocalFile) Create(verbose bool) (err error)
- func (l *LocalFile) Delete(verbose bool) (err error)
- func (l *LocalFile) Exists(verbose bool) (exists bool, err error)
- func (l *LocalFile) GetAccessPermissions() (permissions int, err error)
- func (l *LocalFile) GetAccessPermissionsString() (permissionsString string, err error)
- func (l *LocalFile) GetBaseName() (baseName string, err error)
- func (l *LocalFile) GetDeepCopy() (deepCopy filesinterfaces.File)
- func (l *LocalFile) GetHostDescription() (hostDescription string, err error)
- func (l *LocalFile) GetLocalPath() (path string, err error)
- func (l *LocalFile) GetLocalPathOrEmptyStringIfUnset() (localPath string, err error)
- func (l *LocalFile) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
- func (l *LocalFile) GetParentFileForBaseClassAsLocalFile() (parentAsLocalFile *LocalFile, err error)
- func (l *LocalFile) GetPath() (path string, err error)
- func (l *LocalFile) GetSizeBytes() (fileSizeBytes int64, err error)
- func (l *LocalFile) GetUriAsString() (uri string, err error)
- func (l *LocalFile) IsPathSet() (isSet bool)
- func (l *LocalFile) MoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File, err error)
- func (l *LocalFile) MustAppendBytes(toWrite []byte, verbose bool)
- func (l *LocalFile) MustAppendString(toWrite string, verbose bool)
- func (l *LocalFile) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
- func (l *LocalFile) MustChown(options *parameteroptions.ChownOptions)
- func (l *LocalFile) MustCopyToFile(destFile filesinterfaces.File, verbose bool)
- func (l *LocalFile) MustCreate(verbose bool)
- func (l *LocalFile) MustDelete(verbose bool)
- func (l *LocalFile) MustExists(verbose bool) (exists bool)
- func (l *LocalFile) MustGetAccessPermissions() (permissions int)
- func (l *LocalFile) MustGetAccessPermissionsString() (permissionString string)
- func (l *LocalFile) MustGetBaseName() (baseName string)
- func (l *LocalFile) MustGetHostDescription() (hostDescription string)
- func (l *LocalFile) MustGetLocalPath() (path string)
- func (l *LocalFile) MustGetLocalPathOrEmptyStringIfUnset() (localPath string)
- func (l *LocalFile) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)
- func (l *LocalFile) MustGetParentFileForBaseClassAsLocalFile() (parentAsLocalFile *LocalFile)
- func (l *LocalFile) MustGetPath() (path string)
- func (l *LocalFile) MustGetSizeBytes() (fileSizeBytes int64)
- func (l *LocalFile) MustGetUriAsString() (uri string)
- func (l *LocalFile) MustMoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File)
- func (l *LocalFile) MustReadAsBytes() (content []byte)
- func (l *LocalFile) MustReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte)
- func (l *LocalFile) MustSetPath(path string)
- func (l *LocalFile) MustTruncate(newSizeBytes int64, verbose bool)
- func (l *LocalFile) MustWriteBytes(toWrite []byte, verbose bool)
- func (l *LocalFile) ReadAsBytes() (content []byte, err error)
- func (l *LocalFile) ReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte, err error)
- func (l *LocalFile) SecurelyDelete(ctx context.Context) (err error)
- func (l *LocalFile) SetPath(path string) (err error)
- func (l *LocalFile) String() string
- func (l *LocalFile) Truncate(newSizeBytes int64, verbose bool) (err error)
- func (l *LocalFile) WriteBytes(toWrite []byte, verbose bool) (err error)
Constants ¶
This section is empty.
Variables ¶
var ErrFileBaseParentNotSet = errors.New("parent is not set")
Functions ¶
func DeleteFileByPath ¶
func GetFileByOsFile ¶
func GetFileByOsFile(osFile *os.File) (file filesinterfaces.File, err error)
func ReadFileAsString ¶
Types ¶
type CommandExecutorDirectory ¶
type CommandExecutorDirectory struct { DirectoryBase // contains filtered or unexported fields }
A CommandExecutorDirectory implements the functionality of a `Directory` by executing commands (like: test, stat, cat...).
The benefit of this apporach is an easy way to access directories on any remote system like VMs, Containers, Hosts... while it easy to chain like inside Container on VM behind Jumphost...
The downside of this is the poor performance and the possiblity to see in the process table which operations where done.
func GetCommandExecutorDirectoryByPath ¶
func GetCommandExecutorDirectoryByPath(commandExecutor commandexecutorinterfaces.CommandExecutor, path string) (c *CommandExecutorDirectory, err error)
func GetLocalCommandExecutorDirectoryByPath ¶
func GetLocalCommandExecutorDirectoryByPath(path string) (c *CommandExecutorDirectory, err error)
func NewCommandExecutorDirectory ¶
func NewCommandExecutorDirectory(commandExecutor commandexecutorinterfaces.CommandExecutor) (c *CommandExecutorDirectory, err error)
func (*CommandExecutorDirectory) Chmod ¶
func (c *CommandExecutorDirectory) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
func (*CommandExecutorDirectory) CopyContentToDirectory ¶
func (c *CommandExecutorDirectory) CopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool) (err error)
func (*CommandExecutorDirectory) Create ¶
func (c *CommandExecutorDirectory) Create(verbose bool) (err error)
func (*CommandExecutorDirectory) CreateSubDirectory ¶
func (c *CommandExecutorDirectory) CreateSubDirectory(subDirectoryName string, verbose bool) (createdSubDirectory filesinterfaces.Directory, err error)
func (*CommandExecutorDirectory) Delete ¶
func (c *CommandExecutorDirectory) Delete(verbose bool) (err error)
func (*CommandExecutorDirectory) Exists ¶
func (c *CommandExecutorDirectory) Exists(verbose bool) (exists bool, err error)
func (*CommandExecutorDirectory) GetBaseName ¶
func (c *CommandExecutorDirectory) GetBaseName() (baseName string, err error)
func (*CommandExecutorDirectory) GetCommandExecutor ¶
func (c *CommandExecutorDirectory) GetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor, err error)
func (*CommandExecutorDirectory) GetCommandExecutorAndDirPath ¶
func (c *CommandExecutorDirectory) GetCommandExecutorAndDirPath() (commandExecutor commandexecutorinterfaces.CommandExecutor, dirPath string, err error)
func (*CommandExecutorDirectory) GetCommandExecutorAndDirPathAndHostDescription ¶
func (c *CommandExecutorDirectory) GetCommandExecutorAndDirPathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, dirPath string, hostDescription string, err error)
func (*CommandExecutorDirectory) GetDirName ¶
func (c *CommandExecutorDirectory) GetDirName() (parentPath string, err error)
func (*CommandExecutorDirectory) GetDirPath ¶
func (c *CommandExecutorDirectory) GetDirPath() (dirPath string, err error)
func (*CommandExecutorDirectory) GetFileInDirectory ¶
func (c *CommandExecutorDirectory) GetFileInDirectory(pathToFile ...string) (file filesinterfaces.File, err error)
func (*CommandExecutorDirectory) GetHostDescription ¶
func (c *CommandExecutorDirectory) GetHostDescription() (hostDescription string, err error)
func (*CommandExecutorDirectory) GetLocalPath ¶
func (c *CommandExecutorDirectory) GetLocalPath() (localPath string, err error)
func (*CommandExecutorDirectory) GetParentDirectory ¶
func (c *CommandExecutorDirectory) GetParentDirectory() (parent filesinterfaces.Directory, err error)
func (*CommandExecutorDirectory) GetPath ¶
func (c *CommandExecutorDirectory) GetPath() (path string, err error)
func (*CommandExecutorDirectory) GetSubDirectory ¶
func (c *CommandExecutorDirectory) GetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory, err error)
func (*CommandExecutorDirectory) IsLocalDirectory ¶
func (c *CommandExecutorDirectory) IsLocalDirectory() (isLocalDirectory bool, err error)
func (*CommandExecutorDirectory) ListFilePaths ¶
func (c *CommandExecutorDirectory) ListFilePaths(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (filePaths []string, err error)
func (*CommandExecutorDirectory) ListFiles ¶
func (c *CommandExecutorDirectory) ListFiles(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (files []filesinterfaces.File, err error)
func (*CommandExecutorDirectory) ListSubDirectories ¶
func (c *CommandExecutorDirectory) ListSubDirectories(options *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory, err error)
func (*CommandExecutorDirectory) SetCommandExecutor ¶
func (c *CommandExecutorDirectory) SetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor) (err error)
func (*CommandExecutorDirectory) SetDirPath ¶
func (c *CommandExecutorDirectory) SetDirPath(dirPath string) (err error)
type CommandExecutorFile ¶
type CommandExecutorFile struct { FileBase // contains filtered or unexported fields }
A CommandExecutorFile implements the functionality of a `File` by executing commands (like: test, stat, cat...).
The benefit of this apporach is an easy way to access files on any remote system like VMs, Containers, Hosts... while it easy to chain like inside Container on VM behind Jumphost...
The downside of this is the poor performance and the possiblity to see in the process table which operations where done.
func GetCommandExecutorFileByPath ¶
func GetCommandExecutorFileByPath(commandExector commandexecutorinterfaces.CommandExecutor, path string) (commandExecutorFile *CommandExecutorFile, err error)
func GetLocalCommandExecutorFileByFile ¶
func GetLocalCommandExecutorFileByFile(file filesinterfaces.File, verbose bool) (commandExecutorFile *CommandExecutorFile, err error)
func GetLocalCommandExecutorFileByPath ¶
func GetLocalCommandExecutorFileByPath(localPath string) (commandExecutorFile *CommandExecutorFile, err error)
func MustGetCommandExecutorFileByPath ¶
func MustGetCommandExecutorFileByPath(commandExector commandexecutorinterfaces.CommandExecutor, path string) (commandExecutorFile *CommandExecutorFile)
func MustGetLocalCommandExecutorFileByFile ¶
func MustGetLocalCommandExecutorFileByFile(file filesinterfaces.File, verbose bool) (commandExecutorFile *CommandExecutorFile)
func MustGetLocalCommandExecutorFileByPath ¶
func MustGetLocalCommandExecutorFileByPath(localPath string) (commandExecutorFile *CommandExecutorFile)
func NewCommandExecutorFile ¶
func NewCommandExecutorFile() (c *CommandExecutorFile)
func (*CommandExecutorFile) AppendBytes ¶
func (c *CommandExecutorFile) AppendBytes(toWrite []byte, verbose bool) (err error)
func (*CommandExecutorFile) AppendString ¶
func (c *CommandExecutorFile) AppendString(toWrite string, verbose bool) (err error)
func (*CommandExecutorFile) Chmod ¶
func (c *CommandExecutorFile) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
func (*CommandExecutorFile) Chown ¶
func (c *CommandExecutorFile) Chown(options *parameteroptions.ChownOptions) (err error)
func (*CommandExecutorFile) CopyToFile ¶
func (c *CommandExecutorFile) CopyToFile(destFile filesinterfaces.File, verbose bool) (err error)
func (*CommandExecutorFile) Create ¶
func (c *CommandExecutorFile) Create(verbose bool) (err error)
func (*CommandExecutorFile) Delete ¶
func (c *CommandExecutorFile) Delete(verbose bool) (err error)
func (*CommandExecutorFile) Exists ¶
func (c *CommandExecutorFile) Exists(verbose bool) (exists bool, err error)
func (*CommandExecutorFile) GetAccessPermissions ¶
func (c *CommandExecutorFile) GetAccessPermissions() (permissions int, err error)
func (*CommandExecutorFile) GetAccessPermissionsString ¶
func (c *CommandExecutorFile) GetAccessPermissionsString() (permissionsString string, err error)
func (*CommandExecutorFile) GetBaseName ¶
func (c *CommandExecutorFile) GetBaseName() (baseName string, err error)
func (*CommandExecutorFile) GetCommandExecutor ¶
func (c *CommandExecutorFile) GetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor, err error)
func (*CommandExecutorFile) GetCommandExecutorAndFilePath ¶
func (c *CommandExecutorFile) GetCommandExecutorAndFilePath() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, err error)
func (*CommandExecutorFile) GetCommandExecutorAndFilePathAndHostDescription ¶
func (c *CommandExecutorFile) GetCommandExecutorAndFilePathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, hostDescription string, err error)
func (*CommandExecutorFile) GetDeepCopy ¶
func (c *CommandExecutorFile) GetDeepCopy() (deepCopy filesinterfaces.File)
func (*CommandExecutorFile) GetFilePath ¶
func (c *CommandExecutorFile) GetFilePath() (filePath string, err error)
func (*CommandExecutorFile) GetHostDescription ¶
func (c *CommandExecutorFile) GetHostDescription() (hostDescription string, err error)
func (*CommandExecutorFile) GetLocalPath ¶
func (c *CommandExecutorFile) GetLocalPath() (localPath string, err error)
func (*CommandExecutorFile) GetLocalPathOrEmptyStringIfUnset ¶
func (c *CommandExecutorFile) GetLocalPathOrEmptyStringIfUnset() (localPath string, err error)
func (*CommandExecutorFile) GetParentDirectory ¶
func (c *CommandExecutorFile) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
func (*CommandExecutorFile) GetPath ¶
func (c *CommandExecutorFile) GetPath() (path string, err error)
func (*CommandExecutorFile) GetPathAndHostDescription ¶
func (c *CommandExecutorFile) GetPathAndHostDescription() (path string, hostDescription string, err error)
func (*CommandExecutorFile) GetSizeBytes ¶
func (c *CommandExecutorFile) GetSizeBytes() (fileSize int64, err error)
func (*CommandExecutorFile) GetUriAsString ¶
func (c *CommandExecutorFile) GetUriAsString() (uri string, err error)
func (*CommandExecutorFile) IsRunningOnLocalhost ¶
func (c *CommandExecutorFile) IsRunningOnLocalhost() (isRunningOnLocalhost bool, err error)
func (*CommandExecutorFile) MoveToPath ¶
func (c *CommandExecutorFile) MoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File, err error)
func (*CommandExecutorFile) MustAppendBytes ¶
func (c *CommandExecutorFile) MustAppendBytes(toWrite []byte, verbose bool)
func (*CommandExecutorFile) MustAppendString ¶
func (c *CommandExecutorFile) MustAppendString(toWrite string, verbose bool)
func (*CommandExecutorFile) MustChmod ¶
func (c *CommandExecutorFile) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
func (*CommandExecutorFile) MustChown ¶
func (c *CommandExecutorFile) MustChown(options *parameteroptions.ChownOptions)
func (*CommandExecutorFile) MustCopyToFile ¶
func (c *CommandExecutorFile) MustCopyToFile(destFile filesinterfaces.File, verbose bool)
func (*CommandExecutorFile) MustCreate ¶
func (c *CommandExecutorFile) MustCreate(verbose bool)
func (*CommandExecutorFile) MustDelete ¶
func (c *CommandExecutorFile) MustDelete(verbose bool)
func (*CommandExecutorFile) MustExists ¶
func (c *CommandExecutorFile) MustExists(verbose bool) (exist bool)
func (*CommandExecutorFile) MustGetAccessPermissions ¶
func (c *CommandExecutorFile) MustGetAccessPermissions() (permissions int)
func (*CommandExecutorFile) MustGetAccessPermissionsString ¶
func (c *CommandExecutorFile) MustGetAccessPermissionsString() (permissionString string)
func (*CommandExecutorFile) MustGetBaseName ¶
func (c *CommandExecutorFile) MustGetBaseName() (baseName string)
func (*CommandExecutorFile) MustGetCommandExecutor ¶
func (c *CommandExecutorFile) MustGetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor)
func (*CommandExecutorFile) MustGetCommandExecutorAndFilePath ¶
func (c *CommandExecutorFile) MustGetCommandExecutorAndFilePath() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string)
func (*CommandExecutorFile) MustGetCommandExecutorAndFilePathAndHostDescription ¶
func (c *CommandExecutorFile) MustGetCommandExecutorAndFilePathAndHostDescription() (commandExecutor commandexecutorinterfaces.CommandExecutor, filePath string, hostDescription string)
func (*CommandExecutorFile) MustGetFilePath ¶
func (c *CommandExecutorFile) MustGetFilePath() (filePath string)
func (*CommandExecutorFile) MustGetHostDescription ¶
func (c *CommandExecutorFile) MustGetHostDescription() (hostDescription string)
func (*CommandExecutorFile) MustGetLocalPath ¶
func (c *CommandExecutorFile) MustGetLocalPath() (localPath string)
func (*CommandExecutorFile) MustGetLocalPathOrEmptyStringIfUnset ¶
func (c *CommandExecutorFile) MustGetLocalPathOrEmptyStringIfUnset() (localPath string)
func (*CommandExecutorFile) MustGetParentDirectory ¶
func (c *CommandExecutorFile) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)
func (*CommandExecutorFile) MustGetPath ¶
func (c *CommandExecutorFile) MustGetPath() (path string)
func (*CommandExecutorFile) MustGetPathAndHostDescription ¶
func (c *CommandExecutorFile) MustGetPathAndHostDescription() (path string, hostDescription string)
func (*CommandExecutorFile) MustGetSizeBytes ¶
func (c *CommandExecutorFile) MustGetSizeBytes() (fileSize int64)
func (*CommandExecutorFile) MustGetUriAsString ¶
func (c *CommandExecutorFile) MustGetUriAsString() (uri string)
func (*CommandExecutorFile) MustIsRunningOnLocalhost ¶
func (c *CommandExecutorFile) MustIsRunningOnLocalhost() (isRunningOnLocalhost bool)
func (*CommandExecutorFile) MustMoveToPath ¶
func (c *CommandExecutorFile) MustMoveToPath(path string, useSudo bool, verbose bool) (movedFile filesinterfaces.File)
func (*CommandExecutorFile) MustReadAsBytes ¶
func (c *CommandExecutorFile) MustReadAsBytes() (content []byte)
func (*CommandExecutorFile) MustReadFirstNBytes ¶
func (c *CommandExecutorFile) MustReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte)
func (*CommandExecutorFile) MustSetCommandExecutor ¶
func (c *CommandExecutorFile) MustSetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor)
func (*CommandExecutorFile) MustSetFilePath ¶
func (c *CommandExecutorFile) MustSetFilePath(filePath string)
func (*CommandExecutorFile) MustTruncate ¶
func (c *CommandExecutorFile) MustTruncate(newSizeBytes int64, verbose bool)
func (*CommandExecutorFile) MustWriteBytes ¶
func (c *CommandExecutorFile) MustWriteBytes(toWrite []byte, verbose bool)
func (*CommandExecutorFile) ReadAsBytes ¶
func (c *CommandExecutorFile) ReadAsBytes() (content []byte, err error)
func (*CommandExecutorFile) ReadFirstNBytes ¶
func (c *CommandExecutorFile) ReadFirstNBytes(numberOfBytesToRead int) (firstBytes []byte, err error)
func (*CommandExecutorFile) SecurelyDelete ¶
func (c *CommandExecutorFile) SecurelyDelete(ctx context.Context) (err error)
func (*CommandExecutorFile) SetCommandExecutor ¶
func (c *CommandExecutorFile) SetCommandExecutor(commandExecutor commandexecutorinterfaces.CommandExecutor) (err error)
func (*CommandExecutorFile) SetFilePath ¶
func (c *CommandExecutorFile) SetFilePath(filePath string) (err error)
func (*CommandExecutorFile) String ¶
func (c *CommandExecutorFile) String() string
func (*CommandExecutorFile) Truncate ¶
func (c *CommandExecutorFile) Truncate(newSizeBytes int64, verbose bool) (err error)
func (*CommandExecutorFile) WriteBytes ¶
func (c *CommandExecutorFile) WriteBytes(toWrite []byte, verbose bool) (err error)
type DirectoriesService ¶
type DirectoriesService struct { }
func Directories ¶
func Directories() (d *DirectoriesService)
func NewDirectoriesService ¶
func NewDirectoriesService() (d *DirectoriesService)
func (*DirectoriesService) CreateLocalDirectoryByPath ¶
func (d *DirectoriesService) CreateLocalDirectoryByPath(path string, verbose bool) (l filesinterfaces.Directory, err error)
type DirectoryBase ¶
type DirectoryBase struct {
// contains filtered or unexported fields
}
func NewDirectoryBase ¶
func NewDirectoryBase() (d *DirectoryBase)
func (*DirectoryBase) CheckExists ¶
func (d *DirectoryBase) CheckExists(ctx context.Context) (err error)
func (*DirectoryBase) CreateFileInDirectory ¶
func (d *DirectoryBase) CreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File, err error)
func (*DirectoryBase) CreateFileInDirectoryFromString ¶
func (d *DirectoryBase) CreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile filesinterfaces.File, err error)
func (*DirectoryBase) DeleteFilesMatching ¶
func (d *DirectoryBase) DeleteFilesMatching(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (err error)
func (*DirectoryBase) FileInDirectoryExists ¶
func (d *DirectoryBase) FileInDirectoryExists(verbose bool, path ...string) (fileExists bool, err error)
func (*DirectoryBase) GetFilePathInDirectory ¶
func (d *DirectoryBase) GetFilePathInDirectory(path ...string) (filePath string, err error)
func (*DirectoryBase) GetParentDirectoryForBaseClass ¶
func (d *DirectoryBase) GetParentDirectoryForBaseClass() (parentDirectoryForBaseClass filesinterfaces.Directory, err error)
func (*DirectoryBase) GetPathAndHostDescription ¶
func (d *DirectoryBase) GetPathAndHostDescription() (path string, hostDescription string, err error)
func (*DirectoryBase) ListFilePaths ¶
func (d *DirectoryBase) ListFilePaths(ctx context.Context, listFileOptions *parameteroptions.ListFileOptions) (filePaths []string, err error)
func (*DirectoryBase) ListSubDirectoryPaths ¶
func (d *DirectoryBase) ListSubDirectoryPaths(options *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string, err error)
func (*DirectoryBase) MustCheckExists ¶
func (d *DirectoryBase) MustCheckExists(ctx context.Context)
func (*DirectoryBase) MustCreateFileInDirectory ¶
func (d *DirectoryBase) MustCreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File)
func (*DirectoryBase) MustCreateFileInDirectoryFromString ¶
func (d *DirectoryBase) MustCreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile filesinterfaces.File)
func (*DirectoryBase) MustFileInDirectoryExists ¶
func (d *DirectoryBase) MustFileInDirectoryExists(verbose bool, path ...string) (fileExists bool)
func (*DirectoryBase) MustGetFilePathInDirectory ¶
func (d *DirectoryBase) MustGetFilePathInDirectory(path ...string) (filePath string)
func (*DirectoryBase) MustGetParentDirectoryForBaseClass ¶
func (d *DirectoryBase) MustGetParentDirectoryForBaseClass() (parentDirectoryForBaseClass filesinterfaces.Directory)
func (*DirectoryBase) MustGetPathAndHostDescription ¶
func (d *DirectoryBase) MustGetPathAndHostDescription() (path string, hostDescription string)
func (*DirectoryBase) MustListSubDirectoryPaths ¶
func (d *DirectoryBase) MustListSubDirectoryPaths(options *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string)
func (*DirectoryBase) MustReadFileInDirectoryAsInt64 ¶
func (d *DirectoryBase) MustReadFileInDirectoryAsInt64(path ...string) (value int64)
func (*DirectoryBase) MustReadFileInDirectoryAsLines ¶
func (d *DirectoryBase) MustReadFileInDirectoryAsLines(path ...string) (content []string)
func (*DirectoryBase) MustReadFileInDirectoryAsString ¶
func (d *DirectoryBase) MustReadFileInDirectoryAsString(path ...string) (content string)
func (*DirectoryBase) MustReadFirstLineOfFileInDirectoryAsString ¶
func (d *DirectoryBase) MustReadFirstLineOfFileInDirectoryAsString(path ...string) (firstLine string)
func (*DirectoryBase) MustSetParentDirectoryForBaseClass ¶
func (d *DirectoryBase) MustSetParentDirectoryForBaseClass(parentDirectoryForBaseClass filesinterfaces.Directory)
func (*DirectoryBase) MustWriteBytesToFile ¶
func (d *DirectoryBase) MustWriteBytesToFile(content []byte, verbose bool, path ...string) (writtenFile filesinterfaces.File)
func (*DirectoryBase) MustWriteStringToFileInDirectory ¶
func (d *DirectoryBase) MustWriteStringToFileInDirectory(content string, verbose bool, path ...string) (writtenFile filesinterfaces.File)
func (*DirectoryBase) ReadFileInDirectoryAsInt64 ¶
func (d *DirectoryBase) ReadFileInDirectoryAsInt64(path ...string) (value int64, err error)
func (*DirectoryBase) ReadFileInDirectoryAsLines ¶
func (d *DirectoryBase) ReadFileInDirectoryAsLines(path ...string) (content []string, err error)
func (*DirectoryBase) ReadFileInDirectoryAsString ¶
func (d *DirectoryBase) ReadFileInDirectoryAsString(path ...string) (content string, err error)
func (*DirectoryBase) ReadFirstLineOfFileInDirectoryAsString ¶
func (d *DirectoryBase) ReadFirstLineOfFileInDirectoryAsString(path ...string) (firstLine string, err error)
func (*DirectoryBase) SetParentDirectoryForBaseClass ¶
func (d *DirectoryBase) SetParentDirectoryForBaseClass(parentDirectoryForBaseClass filesinterfaces.Directory) (err error)
func (*DirectoryBase) WriteBytesToFile ¶
func (c *DirectoryBase) WriteBytesToFile(content []byte, verbose bool, path ...string) (writtenFile filesinterfaces.File, err error)
func (*DirectoryBase) WriteStringToFileInDirectory ¶
func (d *DirectoryBase) WriteStringToFileInDirectory(content string, verbose bool, path ...string) (writtenFile filesinterfaces.File, err error)
TODO: Rename to WriteStringtoFile( to make it more generic. This renaming is needed to bring GitRepository and Directory together.
type FileBase ¶
type FileBase struct {
// contains filtered or unexported fields
}
This is the base for `File` providing most convenience functions for file operations.
func NewFileBase ¶
func NewFileBase() (f *FileBase)
func (*FileBase) CheckIsLocalFile ¶
func (*FileBase) ContainsLine ¶
func (*FileBase) CreateParentDirectory ¶
func (*FileBase) EnsureEndsWithLineBreak ¶
func (*FileBase) EnsureLineInFile ¶
func (*FileBase) GetCreationDateByFileName ¶
func (*FileBase) GetFileTypeDescription ¶
func (*FileBase) GetMimeType ¶
func (*FileBase) GetNumberOfLinesWithPrefix ¶
func (*FileBase) GetNumberOfNonEmptyLines ¶
func (*FileBase) GetParentDirectoryPath ¶
func (*FileBase) GetParentFileForBaseClass ¶
func (f *FileBase) GetParentFileForBaseClass() (parentFileForBaseClass filesinterfaces.File, err error)
func (*FileBase) GetPathAndHostDescription ¶
func (*FileBase) GetSha256Sum ¶
func (*FileBase) GetTextBlocks ¶
func (*FileBase) GetValueAsInt ¶
func (*FileBase) GetValueAsString ¶
func (*FileBase) IsContentEqualByComparingSha256Sum ¶
func (*FileBase) IsEmptyFile ¶
func (*FileBase) IsLocalFile ¶
Returns true if the file is a file on the local host.
If a file can return a local path the assumption is it is a local file.
func (*FileBase) IsMatchingSha256Sum ¶
func (*FileBase) IsPgpEncrypted ¶
func (*FileBase) IsYYYYmmdd_HHMMSSPrefix ¶
func (*FileBase) MustAppendLine ¶
func (*FileBase) MustCheckIsLocalFile ¶
func (*FileBase) MustContainsLine ¶
func (*FileBase) MustCreateParentDirectory ¶
func (*FileBase) MustEnsureEndsWithLineBreak ¶
func (*FileBase) MustEnsureLineInFile ¶
func (*FileBase) MustGetCreationDateByFileName ¶
func (*FileBase) MustGetFileTypeDescription ¶
func (*FileBase) MustGetMimeType ¶
func (*FileBase) MustGetNumberOfLinesWithPrefix ¶
func (*FileBase) MustGetNumberOfNonEmptyLines ¶
func (*FileBase) MustGetParentDirectoryPath ¶
func (*FileBase) MustGetParentFileForBaseClass ¶
func (f *FileBase) MustGetParentFileForBaseClass() (parentFileForBaseClass filesinterfaces.File)
func (*FileBase) MustGetPathAndHostDescription ¶
func (*FileBase) MustGetSha256Sum ¶
func (*FileBase) MustGetTextBlocks ¶
func (*FileBase) MustGetValueAsInt ¶
func (*FileBase) MustGetValueAsString ¶
func (*FileBase) MustIsContentEqualByComparingSha256Sum ¶
func (f *FileBase) MustIsContentEqualByComparingSha256Sum(otherFile filesinterfaces.File, verbose bool) (isEqual bool)
func (*FileBase) MustIsEmptyFile ¶
func (*FileBase) MustIsLocalFile ¶
func (*FileBase) MustIsMatchingSha256Sum ¶
func (*FileBase) MustIsPgpEncrypted ¶
func (*FileBase) MustIsYYYYmmdd_HHMMSSPrefix ¶
func (*FileBase) MustPrintContentOnStdout ¶
func (f *FileBase) MustPrintContentOnStdout()
func (*FileBase) MustReadAsBool ¶
func (*FileBase) MustReadAsFloat64 ¶
func (*FileBase) MustReadAsInt ¶
func (*FileBase) MustReadAsInt64 ¶
func (*FileBase) MustReadAsLines ¶
func (*FileBase) MustReadAsLinesWithoutComments ¶
func (*FileBase) MustReadAsString ¶
func (*FileBase) MustReadAsTimeTime ¶
func (*FileBase) MustReadFirstLine ¶
func (*FileBase) MustReadFirstLineAndTrimSpace ¶
func (*FileBase) MustReadLastCharAsString ¶
func (*FileBase) MustRemoveLinesWithPrefix ¶
func (*FileBase) MustReplaceLineAfterLine ¶
func (f *FileBase) MustReplaceLineAfterLine(lineToFind string, replaceLineAfterWith string, verbose bool) (changeSummary *changesummary.ChangeSummary)
func (*FileBase) MustSetParentFileForBaseClass ¶
func (f *FileBase) MustSetParentFileForBaseClass(parentFileForBaseClass filesinterfaces.File)
func (*FileBase) MustSortBlocksInFile ¶
func (*FileBase) MustTrimSpacesAtBeginningOfFile ¶
func (*FileBase) MustWriteInt64 ¶
func (*FileBase) MustWriteLines ¶
func (*FileBase) MustWriteString ¶
func (*FileBase) MustWriteTextBlocks ¶
func (*FileBase) PrintContentOnStdout ¶
func (*FileBase) ReadAsBool ¶
func (*FileBase) ReadAsFloat64 ¶
func (*FileBase) ReadAsInt64 ¶
func (*FileBase) ReadAsLines ¶
func (*FileBase) ReadAsLinesWithoutComments ¶
func (*FileBase) ReadAsString ¶
func (*FileBase) ReadFirstLine ¶
func (*FileBase) ReadFirstLineAndTrimSpace ¶
func (*FileBase) ReadLastCharAsString ¶
func (*FileBase) RemoveLinesWithPrefix ¶
func (*FileBase) ReplaceLineAfterLine ¶
func (f *FileBase) ReplaceLineAfterLine(lineToFind string, replaceLineAfterWith string, verbose bool) (changeSummary *changesummary.ChangeSummary, err error)
func (*FileBase) SetParentFileForBaseClass ¶
func (f *FileBase) SetParentFileForBaseClass(parentFileForBaseClass filesinterfaces.File) (err error)
func (*FileBase) SortBlocksInFile ¶
func (*FileBase) TrimSpacesAtBeginningOfFile ¶
func (*FileBase) WriteInt64 ¶
func (*FileBase) WriteLines ¶
func (*FileBase) WriteString ¶
type FileInfo ¶
func NewFileInfo ¶
func NewFileInfo() (f *FileInfo)
func (*FileInfo) GetPathAndSizeBytes ¶
func (*FileInfo) GetSizeBytes ¶
func (*FileInfo) SetSizeBytes ¶
type FilesService ¶
type FilesService struct { }
func Files ¶
func Files() (f *FilesService)
func NewFilesService ¶
func NewFilesService() (f *FilesService)
func (*FilesService) ReadAsString ¶
func (f *FilesService) ReadAsString(path string) (content string, err error)
func (*FilesService) WriteStringToFile ¶
func (f *FilesService) WriteStringToFile(path string, content string, verbose bool) (err error)
type LocalDirectory ¶
type LocalDirectory struct { DirectoryBase // contains filtered or unexported fields }
func GetCurrentWorkingDirectory ¶
func GetCurrentWorkingDirectory() (workingDirectory *LocalDirectory, err error)
func GetLocalDirectoryByPath ¶
func GetLocalDirectoryByPath(path string) (l *LocalDirectory, err error)
func MustGetLocalDirectoryByPath ¶
func MustGetLocalDirectoryByPath(path string) (l *LocalDirectory)
func NewLocalDirectory ¶
func NewLocalDirectory() (l *LocalDirectory)
func (*LocalDirectory) Chmod ¶
func (l *LocalDirectory) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
func (*LocalDirectory) CopyContentToDirectory ¶
func (l *LocalDirectory) CopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool) (err error)
func (*LocalDirectory) CopyContentToLocalDirectory ¶
func (l *LocalDirectory) CopyContentToLocalDirectory(destDirectory *LocalDirectory, verbose bool) (err error)
func (*LocalDirectory) Create ¶
func (l *LocalDirectory) Create(verbose bool) (err error)
func (*LocalDirectory) CreateFileInDirectory ¶
func (l *LocalDirectory) CreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File, err error)
func (*LocalDirectory) CreateFilesInDirectory ¶
func (l *LocalDirectory) CreateFilesInDirectory(filesToCreate []string, verbose bool) (createdFiles []filesinterfaces.File, err error)
func (*LocalDirectory) CreateSubDirectory ¶
func (l *LocalDirectory) CreateSubDirectory(subDirName string, verbose bool) (createdSubDir filesinterfaces.Directory, err error)
func (*LocalDirectory) Delete ¶
func (l *LocalDirectory) Delete(verbose bool) (err error)
func (*LocalDirectory) Exists ¶
func (l *LocalDirectory) Exists(verbose bool) (exists bool, err error)
func (*LocalDirectory) GetBaseName ¶
func (l *LocalDirectory) GetBaseName() (baseName string, err error)
func (*LocalDirectory) GetDirName ¶
func (l *LocalDirectory) GetDirName() (parentPath string, err error)
func (*LocalDirectory) GetFileInDirectory ¶
func (l *LocalDirectory) GetFileInDirectory(path ...string) (file filesinterfaces.File, err error)
func (*LocalDirectory) GetFileInDirectoryAsLocalFile ¶
func (l *LocalDirectory) GetFileInDirectoryAsLocalFile(filePath ...string) (localFile *LocalFile, err error)
func (*LocalDirectory) GetHostDescription ¶
func (l *LocalDirectory) GetHostDescription() (hostDescription string, err error)
func (*LocalDirectory) GetLocalPath ¶
func (l *LocalDirectory) GetLocalPath() (localPath string, err error)
func (*LocalDirectory) GetParentDirectory ¶
func (l *LocalDirectory) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
func (*LocalDirectory) GetPath ¶
func (l *LocalDirectory) GetPath() (dirPath string, err error)
func (*LocalDirectory) GetSubDirectory ¶
func (l *LocalDirectory) GetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory, err error)
func (*LocalDirectory) GetSubDirectoryAndLocalPath ¶
func (l *LocalDirectory) GetSubDirectoryAndLocalPath(path ...string) (subDirectory filesinterfaces.Directory, subDirectoryPath string, err error)
func (*LocalDirectory) IsEmptyDirectory ¶
func (l *LocalDirectory) IsEmptyDirectory(verbose bool) (isEmpty bool, err error)
func (*LocalDirectory) IsLocalDirectory ¶
func (l *LocalDirectory) IsLocalDirectory() (isLocalDirectory bool, err error)
func (*LocalDirectory) ListFilePaths ¶
func (l *LocalDirectory) ListFilePaths(ctx context.Context, listOptions *parameteroptions.ListFileOptions) (filePathList []string, err error)
func (*LocalDirectory) ListFiles ¶
func (l *LocalDirectory) ListFiles(ctx context.Context, options *parameteroptions.ListFileOptions) (files []filesinterfaces.File, err error)
func (*LocalDirectory) ListSubDirectories ¶
func (l *LocalDirectory) ListSubDirectories(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory, err error)
func (*LocalDirectory) ListSubDirectoriesAsAbsolutePaths ¶
func (l *LocalDirectory) ListSubDirectoriesAsAbsolutePaths(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string, err error)
func (*LocalDirectory) MustChmod ¶
func (l *LocalDirectory) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
func (*LocalDirectory) MustCopyContentToDirectory ¶
func (l *LocalDirectory) MustCopyContentToDirectory(destinationDir filesinterfaces.Directory, verbose bool)
func (*LocalDirectory) MustCopyContentToLocalDirectory ¶
func (l *LocalDirectory) MustCopyContentToLocalDirectory(destDirectory *LocalDirectory, verbose bool)
func (*LocalDirectory) MustCreate ¶
func (l *LocalDirectory) MustCreate(verbose bool)
func (*LocalDirectory) MustCreateFileInDirectory ¶
func (l *LocalDirectory) MustCreateFileInDirectory(verbose bool, path ...string) (createdFile filesinterfaces.File)
func (*LocalDirectory) MustCreateFilesInDirectory ¶
func (l *LocalDirectory) MustCreateFilesInDirectory(filesToCreate []string, verbose bool) (createdFiles []filesinterfaces.File)
func (*LocalDirectory) MustCreateSubDirectory ¶
func (l *LocalDirectory) MustCreateSubDirectory(subDirName string, verbose bool) (createdSubDir filesinterfaces.Directory)
func (*LocalDirectory) MustDelete ¶
func (l *LocalDirectory) MustDelete(verbose bool)
func (*LocalDirectory) MustExists ¶
func (l *LocalDirectory) MustExists(verbose bool) (exists bool)
func (*LocalDirectory) MustGetBaseName ¶
func (l *LocalDirectory) MustGetBaseName() (baseName string)
func (*LocalDirectory) MustGetDirName ¶
func (l *LocalDirectory) MustGetDirName() (dirName string)
func (*LocalDirectory) MustGetFileInDirectory ¶
func (l *LocalDirectory) MustGetFileInDirectory(path ...string) (file filesinterfaces.File)
func (*LocalDirectory) MustGetFileInDirectoryAsLocalFile ¶
func (l *LocalDirectory) MustGetFileInDirectoryAsLocalFile(filePath ...string) (localFile *LocalFile)
func (*LocalDirectory) MustGetHostDescription ¶
func (l *LocalDirectory) MustGetHostDescription() (hostDescription string)
func (*LocalDirectory) MustGetLocalPath ¶
func (l *LocalDirectory) MustGetLocalPath() (localPath string)
func (*LocalDirectory) MustGetParentDirectory ¶
func (l *LocalDirectory) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)
func (*LocalDirectory) MustGetPath ¶
func (l *LocalDirectory) MustGetPath() (dirPath string)
func (*LocalDirectory) MustGetSubDirectory ¶
func (l *LocalDirectory) MustGetSubDirectory(path ...string) (subDirectory filesinterfaces.Directory)
func (*LocalDirectory) MustGetSubDirectoryAndLocalPath ¶
func (l *LocalDirectory) MustGetSubDirectoryAndLocalPath(path ...string) (subDirectory filesinterfaces.Directory, subDirectoryPath string)
func (*LocalDirectory) MustIsEmptyDirectory ¶
func (l *LocalDirectory) MustIsEmptyDirectory(verbose bool) (isEmpty bool)
func (*LocalDirectory) MustIsLocalDirectory ¶
func (l *LocalDirectory) MustIsLocalDirectory() (isLocalDirectory bool)
func (*LocalDirectory) MustListSubDirectories ¶
func (l *LocalDirectory) MustListSubDirectories(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectories []filesinterfaces.Directory)
func (*LocalDirectory) MustListSubDirectoriesAsAbsolutePaths ¶
func (l *LocalDirectory) MustListSubDirectoriesAsAbsolutePaths(listDirectoryOptions *parameteroptions.ListDirectoryOptions) (subDirectoryPaths []string)
func (*LocalDirectory) MustSetLocalPath ¶
func (l *LocalDirectory) MustSetLocalPath(localPath string)
func (*LocalDirectory) MustSubDirectoryExists ¶
func (l *LocalDirectory) MustSubDirectoryExists(subDirName string, verbose bool) (subDirExists bool)
func (*LocalDirectory) SetLocalPath ¶
func (l *LocalDirectory) SetLocalPath(localPath string) (err error)
func (*LocalDirectory) SubDirectoryExists ¶
func (l *LocalDirectory) SubDirectoryExists(subDirName string, verbose bool) (subDirExists bool, err error)
type LocalFile ¶
type LocalFile struct { FileBase // contains filtered or unexported fields }
A LocalFile represents a locally available file.
func GetLocalFileByFile ¶
func GetLocalFileByFile(inputFile filesinterfaces.File) (localFile *LocalFile, err error)
func GetLocalFileByPath ¶
func MustGetLocalFileByFile ¶
func MustGetLocalFileByFile(inputFile filesinterfaces.File) (localFile *LocalFile)
func MustGetLocalFileByPath ¶
func MustNewLocalFileByPath ¶
func NewLocalFile ¶
func NewLocalFile() (l *LocalFile)
func NewLocalFileByPath ¶
func (*LocalFile) AppendBytes ¶
func (*LocalFile) AppendString ¶
func (*LocalFile) Chmod ¶
func (l *LocalFile) Chmod(chmodOptions *parameteroptions.ChmodOptions) (err error)
func (*LocalFile) Chown ¶
func (l *LocalFile) Chown(options *parameteroptions.ChownOptions) (err error)
func (*LocalFile) CopyToFile ¶
func (l *LocalFile) CopyToFile(destFile filesinterfaces.File, verbose bool) (err error)
func (*LocalFile) Delete ¶
Delete a file if it exists. If the file is already absent this function does nothing.
func (*LocalFile) GetAccessPermissions ¶
func (*LocalFile) GetAccessPermissionsString ¶
func (*LocalFile) GetBaseName ¶
func (*LocalFile) GetDeepCopy ¶
func (l *LocalFile) GetDeepCopy() (deepCopy filesinterfaces.File)
func (*LocalFile) GetHostDescription ¶
func (*LocalFile) GetLocalPath ¶
func (*LocalFile) GetLocalPathOrEmptyStringIfUnset ¶
func (*LocalFile) GetParentDirectory ¶
func (l *LocalFile) GetParentDirectory() (parentDirectory filesinterfaces.Directory, err error)
func (*LocalFile) GetParentFileForBaseClassAsLocalFile ¶
func (*LocalFile) GetSizeBytes ¶
func (*LocalFile) GetUriAsString ¶
func (*LocalFile) MoveToPath ¶
func (*LocalFile) MustAppendBytes ¶
func (*LocalFile) MustAppendString ¶
func (*LocalFile) MustChmod ¶
func (l *LocalFile) MustChmod(chmodOptions *parameteroptions.ChmodOptions)
func (*LocalFile) MustChown ¶
func (l *LocalFile) MustChown(options *parameteroptions.ChownOptions)
func (*LocalFile) MustCopyToFile ¶
func (l *LocalFile) MustCopyToFile(destFile filesinterfaces.File, verbose bool)
func (*LocalFile) MustCreate ¶
func (*LocalFile) MustDelete ¶
func (*LocalFile) MustExists ¶
func (*LocalFile) MustGetAccessPermissions ¶
func (*LocalFile) MustGetAccessPermissionsString ¶
func (*LocalFile) MustGetBaseName ¶
func (*LocalFile) MustGetHostDescription ¶
func (*LocalFile) MustGetLocalPath ¶
func (*LocalFile) MustGetLocalPathOrEmptyStringIfUnset ¶
func (*LocalFile) MustGetParentDirectory ¶
func (l *LocalFile) MustGetParentDirectory() (parentDirectory filesinterfaces.Directory)