Documentation
¶
Overview ¶
Package dirs defines the working and source directories used by btpeer_manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirContext ¶
type DirContext struct { Working *WorkingDirectory Src *SrcDirectory }
DirContext is a container for working and src directories.
func (*DirContext) String ¶
func (dc *DirContext) String() string
type SrcDirectory ¶
type SrcDirectory struct { // ChromiumosDirPath is the path to the root chromiumos source directory. ChromiumosDirPath string // BTPeerManagerDirPath is the path the source directory for btpeer_manager. BTPeerManagerDirPath string // ChameleonDirPath is the path to the chameleon repo source directory. ChameleonDirPath string // ChameleonDistPath is the path to the chameleon dist directory where // chameleond bundles are built to. ChameleonDistDirPath string }
SrcDirectory defines related source directories.
func NewSrcDirectory ¶
func NewSrcDirectory(chromiumosDirPath string) (*SrcDirectory, error)
NewSrcDirectory creates a new SrcDirectory and validates that all required directories exist under chromiumosDirPath.
type WorkingDirectory ¶
type WorkingDirectory struct { // BaseDirPath is the base working directory containing all other working // subdirectories. BaseDirPath string // ChameleondBundlesDirPath is the path to the directory where // built chameleond bundles are stored. ChameleondBundlesDirPath string // ImagesDirPath is the path to the directory where downloaded images are stored. ImagesDirPath string // ConfigDirPath is the path to the directory where config files are // downloaded to and uploaded from ConfigDirPath string }
WorkingDirectory defines related working directories and provides functions for cleaning them.
func NewWorkingDirectory ¶
func NewWorkingDirectory(workingDirPath string) (*WorkingDirectory, error)
NewWorkingDirectory initializes a new WorkingDirectory, creating any missing directories as needed.
func (*WorkingDirectory) Clean ¶
func (wd *WorkingDirectory) Clean() error
Clean removes all working subdirectories.
Click to show internal directories.
Click to hide internal directories.