From 5e6a8b26066a0dcf05bd0325427295598bb2019d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Grill?= Date: Sun, 4 Aug 2024 08:54:43 +0200 Subject: [PATCH] configuration example and readme --- .github/workflows/go.yml | 6 +++--- README.md | 35 ++++++++++++++++++++++++++++++++++ example/main.go | 25 ------------------------ example/potatodrive-minio.reg | Bin 0 -> 790 bytes 4 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 example/main.go create mode 100644 example/potatodrive-minio.reg diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 28a6b0f..face849 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -28,8 +28,8 @@ jobs: run: go test -v ./... - name: Build - run: go build -o potato-s3.exe ./cmd/s3 + run: go build -o potatodrive.exe ./cmd/main - uses: actions/upload-artifact@v4 with: - name: potato-s3.exe - path: potato-s3.exe + name: potatodrive.exe + path: potatodrive.exe diff --git a/README.md b/README.md index 701b819..c8eceb1 100644 --- a/README.md +++ b/README.md @@ -1 +1,36 @@ +# PotatoDrive + +Windows user-space locally-cached virtual file system client. Based on [Projected File System](https://learn.microsoft.com/en-us/windows/win32/projfs/projected-file-system) service available on Windows 10+ and works similar to OneDrive, using the local directory as a cache of the remote state. + +:construction: PotatoDrive is in early development phase, don't trust it with data you're not willing to lose. Keep your backups safe (as always)! + +Features: + +* Windows 10+ +* Supports standard S3 (AWS, BackBlaze, Minio, etc..) as backend without additional server +* Files are cached locally +* Multiple folder bindings on a single machine + +## Installation + +Installer is not (yet) available, latest binaries can be downloaded as [artifacts from successful builds](https://github.com/balazsgrill/potatodrive/actions). + +To work, Projected File System service needs to be [enabled](https://learn.microsoft.com/en-us/windows/win32/projfs/enabling-windows-projected-file-system) (disabled by default): + +```PowerShell +Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart +``` + +## Configuration + +Configuration is stored in Windows Registry, see [example.reg](example/potatodrive-minio.reg). + +## Running + +Once configured, + +# Development + +* [afero](https://github.com/spf13/afero) is used as backend interface, meaning that any + Windows user-space virtual file system binding to [afero](https://github.com/spf13/afero) file systems backend. Makes it possible to implement virtual file systems for windows backed by any kind of user-space implementation of virtual file system. diff --git a/example/main.go b/example/main.go deleted file mode 100644 index cd99ad4..0000000 --- a/example/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "log" - "os" - "os/signal" - "syscall" - - "github.com/balazsgrill/potatodrive/filesystem" - "github.com/spf13/afero" -) - -func main() { - fs := afero.NewBasePathFs(afero.NewOsFs(), "C:\\work\\vfsbase") - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - closer, err := filesystem.StartProjecting("C:\\work\\vfs", fs) - if err != nil { - log.Panic(err) - } - - <-c - closer.Close() - os.Exit(1) -} diff --git a/example/potatodrive-minio.reg b/example/potatodrive-minio.reg new file mode 100644 index 0000000000000000000000000000000000000000..455e229305276101cde3ae93dedcc30ad2fdbc79 GIT binary patch literal 790 zcmcJNSx>@16ot>TiT{E0T_Y*DB|ZpZ#089%Ma2+Ws#KODAgDiH{bowR_--cC&Ryo* zbI;uGuZALx)K#p7rpo9>p`P(gHPb{NcuGVgtQb3^I`Ik72z!K`*S2<8o7%AZL1(() z&Yjx2R8>VC^Ka{lf00;O6{0P9+QfRnrA=;#)`#&C9Y#O{z|w2HYoCCjm$IH(hn zSEk1#uYoFa6+n$q>J-aEw*h(YYFNY`sQ#b(9w>oTZnne;U|hE>So@Oya2QoYeD`5*5*7%&*_R)L2uOWgOxJ! de|fU2yc%~x`ti`#V0V|8T`DAO*WYx8e*pPwdC&j= literal 0 HcmV?d00001