-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning up logging around S&D & Gdrive (#412)
* Adding sync & delete support
- Loading branch information
Showing
11 changed files
with
142 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ ftpserver | |
.idea | ||
.vscode | ||
*.json | ||
__debug__bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# File system loading | ||
|
||
On top of the supported file system and their associated config, | ||
they are few parameters that can be enabled. | ||
|
||
## Read-only | ||
This blocks any writing call to the underlying file system. It can be abled by the `read_only` boolean parameter. | ||
|
||
```json | ||
{ | ||
"version": 1, | ||
"accesses": [ | ||
{ | ||
"read_only": true, | ||
|
||
// The usual FS config: | ||
"user": "test", | ||
"pass": "test", | ||
"fs": "os", | ||
"params": { | ||
"basePath": "/tmp" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Shared | ||
This makes sure the underlying filesystem is loaded once per use. It can be enabled by the `shared` boolean parameter. | ||
|
||
```json | ||
{ | ||
"version": 1, | ||
"accesses": [ | ||
{ | ||
"shared": true, | ||
// The usual FS config: | ||
"user": "test", | ||
"pass": "test", | ||
"fs": "os", | ||
"params": { | ||
"basePath": "/tmp" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Sync & Delete | ||
This creates a temporary local folder that will be replicated to a destination file system. | ||
|
||
|
||
```json | ||
{ | ||
"version": 1, | ||
"accesses": [ | ||
{ | ||
"sync_and_delete": { | ||
"enable": true, // To enable it | ||
"directory": "/tmp/dir" // Temporary directory (optional) | ||
}, | ||
// The usual FS config: | ||
"user": "test", | ||
"pass": "test", | ||
"fs": "os", | ||
"params": { | ||
"basePath": "/target" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Logging | ||
```json | ||
{ | ||
"version": 1, | ||
"accesses": [ | ||
{ | ||
"logging": { | ||
"file_accesses": true, // This logs every single file access | ||
"ftp_exchanges": true // This logs every single FTP command | ||
}, | ||
// The usual FS config: | ||
"user": "test", | ||
"pass": "test", | ||
"fs": "os", | ||
"params": { | ||
"basePath": "/target" | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters