Full application rewrite

This commit is contained in:
2025-01-04 01:49:48 +03:00
parent 70f32b799c
commit 754aecd69a
32 changed files with 1244 additions and 489 deletions

View File

@@ -0,0 +1,21 @@
package modes
import (
"fmt"
"os"
)
type HardLink struct {
}
func (h HardLink) PlaceIt(sourcePath, targetPath string, mode os.FileMode) error {
if err := os.Link(sourcePath, targetPath); err != nil {
if os.IsExist(err) {
return nil
}
return fmt.Errorf("create hard link: %w", err)
}
return nil
}