Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project represents the struct used to handle project related operations.
func NewProject ¶
func NewProject(fs afero.Fs, projectDir string, settingsDirName string, configFileName string, console Console) *Project
NewProject creates and returns a new Project struct instance.
func (*Project) CleanupTmpDir ¶
CleanupTmpDir removes the project's temporary directory. If the temporary directory does not exist, it does not return any errors.
func (*Project) ConfigFilePath ¶
ConfigFilePath returns the path to the project's configuration file.
func (*Project) Initialize ¶
Initialize initializes a new project with starter files.
func (*Project) ProjectDir ¶
ProjectDir returns the path to the project's root dir
func (*Project) WriteTmpFile ¶
WriteTmpFile writes a file to the temporary directory of the project. The provided path is treated as relative to the project's temporary directory. If any directories in the path do not exist, they are created. If the file in path already exists, it is overwritten. On success it returns the absolute path to the new file. If there is an error, it returns that error. In most cases callers should call the Project.CleanupTmpDir function after calling this function usually with a defer to ensure that the tmp dir has been cleaned up.