Documentation
¶
Index ¶
- Constants
- Variables
- func Append(ctx context.Context, data wshrpc.FileData) error
- func Copy(ctx context.Context, data wshrpc.CommandFileCopyData) error
- func Delete(ctx context.Context, data wshrpc.CommandDeleteFileData) error
- func Join(ctx context.Context, path string, parts ...string) (*wshrpc.FileInfo, error)
- func ListEntries(ctx context.Context, path string, opts *wshrpc.FileListOpts) ([]*wshrpc.FileInfo, error)
- func ListEntriesStream(ctx context.Context, path string, opts *wshrpc.FileListOpts) <-chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteListEntriesRtnData]
- func Mkdir(ctx context.Context, path string) error
- func Move(ctx context.Context, data wshrpc.CommandFileCopyData) error
- func PutFile(ctx context.Context, data wshrpc.FileData) error
- func Read(ctx context.Context, data wshrpc.FileData) (*wshrpc.FileData, error)
- func ReadStream(ctx context.Context, data wshrpc.FileData) <-chan wshrpc.RespOrErrorUnion[wshrpc.FileData]
- func Stat(ctx context.Context, path string) (*wshrpc.FileInfo, error)
Constants ¶
View Source
const ( RemoteFileTransferSizeLimit = 32 * 1024 * 1024 DefaultTimeout = 30 * time.Second FileMode = os.FileMode(0644) DirMode = os.FileMode(0755) | os.ModeDir RecursiveRequiredError = "recursive flag must be set for directory operations" MergeRequiredError = "directory already exists at %q, set overwrite flag to delete the existing contents or set merge flag to merge the contents" OverwriteRequiredError = "file already exists at %q, set overwrite flag to delete the existing file" )
Variables ¶
View Source
var RpcClient *wshutil.WshRpc
This needs to be set by whoever initializes the client, either main-server or wshcmd-connserver
Functions ¶
func Delete ¶ added in v0.14.0
func Delete(ctx context.Context, data wshrpc.CommandDeleteFileData) error
func ListEntries ¶ added in v0.14.0
func ListEntriesStream ¶ added in v0.14.0
func ListEntriesStream(ctx context.Context, path string, opts *wshrpc.FileListOpts) <-chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteListEntriesRtnData]
func ReadStream ¶ added in v0.14.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.