Documentation ¶
Index ¶
- Constants
- Variables
- func ContentIsDiff(cont1 string, cont2 string) (bool, error)
- func DeleteRepoIfExists(store_loc string) error
- func DetermMethod(origin string) (string, error)
- func ExistsInFS(filename string) bool
- func FindInFS(filename string) (string, error)
- func FindInFSDir(filename string, files []os.FileInfo, dirname string) (string, error)
- func GetContentFS(filename string) (string, error)
- func GetFileDescriptorFS(filename string) (billy.File, error)
- func NewFS()
- func RepoExists(store_loc string) bool
- func WriteToFS(filename string, content string) error
- type Config
- type DontChangeConfig
- type FileMap
- func (fm *FileMap) ExistsInFS() bool
- func (fm *FileMap) ExistsLocal() bool
- func (fm *FileMap) FMIsMoreRecent() bool
- func (fm *FileMap) GetFSFilename() string
- func (fm *FileMap) GetModTimeOrigin() (time.Time, error)
- func (fm *FileMap) GetOriginFilename() string
- func (fm *FileMap) HasChanged() (bool, error)
- func (fm *FileMap) LocalIsMoreRecent() bool
- func (fm *FileMap) Refresh()
- func (fm *FileMap) SetFilename(filename string) error
- func (fm *FileMap) Update(mode ...string) error
- type FileSystem
- type Gitter
- type SyncConfig
- type SyncFile
- type UserConfig
Constants ¶
View Source
const ( NAME = "Dotfile Sync" VERSION = "0.1.2" AUTHOR = "jochemste" )
Variables ¶
View Source
var SyncChanged bool = false
View Source
var Syncfilepath string = ".syncinfo"
Functions ¶
func DeleteRepoIfExists ¶
Delete the repository if it exists
func DetermMethod ¶
func ExistsInFS ¶
func FindInFSDir ¶
Recursive find in directory function (private)
func GetContentFS ¶
func GetFileDescriptorFS ¶
Types ¶
type Config ¶
type Config struct { UserSettings UserConfig DoNotChange DontChangeConfig }
Configuration struct
func (*Config) IsWritable ¶ added in v0.1.2
type DontChangeConfig ¶
Information that is used and adjusted automatically
type FileMap ¶
type FileMap struct { Origin string FSPath string Changed bool Message string OriginTime time.Time FSTime time.Time NeedsCommit bool }
func NewFileMap ¶
func NewFileMap() *FileMap
func (*FileMap) ExistsInFS ¶
func (*FileMap) ExistsLocal ¶
func (*FileMap) FMIsMoreRecent ¶ added in v0.1.2
func (*FileMap) GetFSFilename ¶
func (*FileMap) GetOriginFilename ¶
func (*FileMap) HasChanged ¶
Determine if a file has changed. Returns true if it has or the file does not exist in the local filesystem and/or the memory filesystem
func (*FileMap) LocalIsMoreRecent ¶ added in v0.1.2
func (*FileMap) SetFilename ¶ added in v0.1.2
type Gitter ¶
func (*Gitter) PushToRemote ¶
type SyncConfig ¶
func NewSyncConfig ¶
func NewSyncConfig() *SyncConfig
func (*SyncConfig) AddFile ¶
func (sc *SyncConfig) AddFile(s SyncFile)
func (*SyncConfig) AddNewFile ¶ added in v0.1.2
func (sc *SyncConfig) AddNewFile(filename string)
func (*SyncConfig) FromFS ¶
func (sc *SyncConfig) FromFS() error
func (*SyncConfig) IsInSync ¶ added in v0.1.2
func (sc *SyncConfig) IsInSync(filename string) bool
func (*SyncConfig) Print ¶
func (sc *SyncConfig) Print()
func (*SyncConfig) SetLastSync ¶
func (sc *SyncConfig) SetLastSync(t time.Time)
func (*SyncConfig) ToFS ¶
func (sc *SyncConfig) ToFS() error
Click to show internal directories.
Click to hide internal directories.