How to call the librclone with filter options?

Hey all,

How to filter using the librclone in Go program? Please look at the following example.

librclone.Initialize()
defer librclone.Finalize()

options := map[string]interface{}{
	"main": map[string]string{
		"LogLevel": "DEBUG",
	},
}

optionsJSON, err := json.Marshal(options)
if err != nil {
	return eris.Wrap(err, "Error marshalling options")
}

_, status := librclone.RPC("options/set", string(optionsJSON))
if status != 200 {
	return eris.Wrap(err, "Error setting options")
}

syncRequest := map[string]interface{}{
	"async": false,
	"srcFs": "./tmp",
	"dstFs": "./tmp1",
}

syncRequestJSON, err := json.Marshal(syncRequest)
if err != nil {
	return eris.Wrap(err, "Error marshalling sync request")
}

// --------------->  HERE: how to filter just "**/*.png" files to be copied?   <--------------
librclone.RPC("sync/copy", string(syncRequestJSON))

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.