This repository has been archived on 2025-06-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
server/fileexporter/copy.go
Pierre-Olivier Mercier ac5982f905
All checks were successful
continuous-integration/drone/push Build is passing
fileexporter: Close opened fd
2025-05-07 14:01:12 +02:00

22 lines
389 B
Go

package main
import (
"errors"
"io"
"srs.epita.fr/fic-server/libfic"
)
func init() {
OutputFormats["copy"] = func(args ...string) (func(string) (io.WriteCloser, error), io.Closer, error) {
if len(args) > 1 {
return nil, nil, errors.New("copy can only take 1 argument: [destination-folder]")
}
if len(args) == 1 {
fic.FilesDir = args[0]
}
return nil, nil, nil
}
}