Skip to content

sadihakan/snake-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnakeSync

Simple File Backup Tool

Getting Started

Requirements

  • Go >= 1.17

CLI Usage

Scan

  • How to use the program via scan
go run ./cmd -scan 

With Flag

  • How to run the program
go run ./cmd -path=<Path> 
  • path
    Flag: -path
    Type: string

API Usage

  • How to import database
package main

import (
  "errors"
  snakesync "github.com/sadihakan/snake-sync"
)

func main() {
	// Make callback
	cb := new(NotifyCallback)

	// Inıtılıze snake sync
	ss := snakesync.New()

	//Create Watcher
	ss.NewWatcher()

	//Set Callback
	ss.SetNotifyCallback(cb)

	//Add file path
	ss.AddFilePath(path)

	if ss.Error != nil {
		panic(ss.Error)
	}

	go ss.Chase()

	<-ss.Chan()
}

Contributors names and contact info

ex. @sadihakan
ex. @akdilsiz

License

This project is licensed under the sadihakan License - see the LICENSE.md file for details

snake-sync