Documentation
¶
Overview ¶
Package fsadapter provides file-engine components.
Index ¶
- func AtomicWriteFile(fullPath string, perm os.FileMode, r io.Reader) error
- func SafeJoin(base string, parts ...string) (string, error)
- type FileSystem
- type SftpFs
- func (s *SftpFs) AtomicWriteFile(_ context.Context, perm uint32, data []byte, parts ...string) error
- func (s *SftpFs) Close()
- func (s *SftpFs) CreateFolder(_ context.Context, parts ...string) error
- func (s *SftpFs) Exists(parts ...string) (bool, error)
- func (s *SftpFs) MoveUploadedFile(_ context.Context, src, dst []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileSystem ¶
type FileSystem interface {
CreateFolder(ctx context.Context, parts ...string) error
AtomicWriteFile(ctx context.Context, perm uint32, data []byte, parts ...string) error
MoveUploadedFile(ctx context.Context, src, dst []string) error
Exists(parts ...string) (bool, error)
}
FileSystem defines the filesystem operations required by task processing. Implementations belong to adapter packages such as local or sftp.
type SftpFs ¶
type SftpFs struct {
// contains filtered or unexported fields
}
SftpFs is an adapter implementation backed by an SFTP remote filesystem.
func (*SftpFs) AtomicWriteFile ¶
func (*SftpFs) CreateFolder ¶
Click to show internal directories.
Click to hide internal directories.