12 releases

0.3.1 Jan 18, 2024
0.3.0 Jan 18, 2024
0.2.4 Sep 2, 2023
0.2.2 May 23, 2023
0.1.5 Apr 18, 2023

#385 in Filesystem

Download history 12/week @ 2023-11-12 5/week @ 2023-11-19 46/week @ 2023-11-26 1/week @ 2023-12-10 11/week @ 2023-12-17 22/week @ 2023-12-24 68/week @ 2024-01-14 38/week @ 2024-01-28 14/week @ 2024-02-04 61/week @ 2024-02-11 387/week @ 2024-02-18

500 downloads per month

MIT/Apache

34KB
801 lines

file store client

Click to [File Store Server]

Make config file

fsc create
[server]
# server addr
addr="127.0.0.1:7556"
# used to verify whether the service_name
service_name="file-store-service"
# used to verify whether the verify_key
verify_key=""
# the timeout period for the client to request the server
request_out_time_ms=15000

# used to configure TLS communication encryption (optional).
# if not provided, TLS will not be used for communication encryption
[tls]
# ca file path (optional)
# if not provided, the server’s certificate will not be verified.
# ca = "./tls/ca.crt"

# cert file path
cert = "./tls/client-crt.pem"

# key file path
key = "./tls/client-key.pem"

help

Usage: fsc <COMMAND>

Commands:
  create  create config
  push    push file
  pull    pull file
  image   image path
  show    show remote directory contents
  info    show remote file info
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

push

Usage: fsc push [OPTIONS] <FILE>

Arguments:
  <FILE>  local file

Options:
  -d, --dir <DIR>      save dir
  -a, --async          async write
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if service exists file, over write file
  -h, --help           Print help

fsc image push

Usage: fsc image push [OPTIONS] <PATH>

Arguments:
  <PATH>  local path

Options:
  -d, --dir <DIR>      save dir
  -a, --async          async write
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if service exists file, over write file
  -h, --help           Print help

fsc pull

Usage: fsc pull [OPTIONS] <FILE>

Arguments:
  <FILE>  remote file path

Options:
  -s, --save <SAVE>    save file path
  -b, --block <BLOCK>  transfer block size default 131072 [default: 131072]
  -o, --overwrite      if exists file, over write file
  -h, --help           Print help

example

fsc push ./file
fsc image push ./dirctory
fsc pull ./file
fsc pull ./file -s ./save_file

Dependencies

~20–55MB
~1M SLoC