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

22 lines
368 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), error) {
if len(args) > 1 {
return nil, errors.New("copy can only take 1 argument: [destination-folder]")
}
if len(args) == 1 {
fic.FilesDir = args[0]
}
return nil, nil
}
}