NewFsDstFile creates a new dst fs with a destination file name from the arguments
(args []string)
| 213 | |
| 214 | // NewFsDstFile creates a new dst fs with a destination file name from the arguments |
| 215 | func NewFsDstFile(args []string) (fdst fs.Fs, dstFileName string) { |
| 216 | dstRemote, dstFileName, err := fspath.Split(args[0]) |
| 217 | if err != nil { |
| 218 | fs.Fatalf(nil, "Parsing %q failed: %v", args[0], err) |
| 219 | } |
| 220 | if dstRemote == "" { |
| 221 | dstRemote = "." |
| 222 | } |
| 223 | if dstFileName == "" { |
| 224 | fs.Fatalf(nil, "%q is a directory", args[0]) |
| 225 | } |
| 226 | fdst = newFsDir(dstRemote) |
| 227 | return |
| 228 | } |
| 229 | |
| 230 | // ShowStats returns true if the user added a `--stats` flag to the command line. |
| 231 | // |