Categorygithub.com/nokute78/file-collector
repositorypackage
0.0.2
Repository: https://github.com/nokute78/file-collector.git
Documentation: pkg.go.dev

# README

file-collector

Go Report Card

Overview

file-collector collects files , copies them and executes command before/after copying.

Usage

file-collector -c config.json

Configuration File

Configuration File is in JSON format.

PropertyTypeDescriptionRequired
srcsArray of srcDetails are later.Yes
dststringThe root directory path to copy file.Yes
after_cmdstringThe command which is executed after copying. If exit code is not 0, cancel copying.No

src property

PropertyTypeDescriptionRequired
pathstringFile path to copy.Yes
dst_pathstringDestination path. It should be relative path. The file will be copied under dst.Yes
checksumstringGenerate checksum file. The file name will be path + . + checksum. (e.g. sample.txt.md5) md5, sha1 and sha256 are supported.No
before_cmdstringThe command which is executed before copying. If exit code is not 0, cancel copying. ${target} will be replaced by path.No
after_cmdstringThe command which is executed after copying. If exit code is not 0, cancel copying. ${target} will be replaced by dst_path.No

License

Apache License v2.0