README
¶
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.
{
"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.
{
"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.
{
"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
{
"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"
}
}
]
}
Documentation
¶
Overview ¶
Package fs provides all the core features related to file-system access
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UnsupportedFsError ¶
type UnsupportedFsError struct { Type string // contains filtered or unexported fields }
UnsupportedFsError is returned when the described file system is not supported
func (UnsupportedFsError) Error ¶
func (err UnsupportedFsError) Error() string
Directories
¶
Path | Synopsis |
---|---|
Package afos provide an afero OS FS access layer
|
Package afos provide an afero OS FS access layer |
Package dropbox provides a Dropbox layer
|
Package dropbox provides a Dropbox layer |
Package fslog provides an afero FS logging package
|
Package fslog provides an afero FS logging package |
Package gdrive provides a Google Drive access layer
|
Package gdrive provides a Google Drive access layer |
Package mail provides a mail access layer
|
Package mail provides a mail access layer |
Package s3 provides an AWS S3 access layer
|
Package s3 provides an AWS S3 access layer |
Package sftp provides an SFTP connection layer
|
Package sftp provides an SFTP connection layer |
Package stripprefix is a file-system abstraction layer to strip a part of the path
|
Package stripprefix is a file-system abstraction layer to strip a part of the path |
Click to show internal directories.
Click to hide internal directories.