parter

package module
v0.0.0-...-ea35f92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 7 Imported by: 0

README

ParterGoDoc

Parter is a command line utility (and library) for breaking a file into smaller pieces and reassembling it. While meant to be primarily a command line utility, there a a few methods exported for library use. Check out the link to the https://godoc.org documentation above.

Why?

Because.

Usage

The application provides all the available options by running parter usage so examples will be given instead of a full explanation of the command line interface.

To break a file name test.txt into chunks of 10MB size use:

$ parter d test.txt 10M # Application will probably complain unless you have a
10M+ text file lying around

NOTE: The application accepts B, M, K, and G (why?) for sizes and understands them to be bytes, kilobytes, megabytes, and gigabytes (again why?) respectively. Without a size indicator the program will assume the number is a file count as shown below.

To break a file name test.txt into 2 files use:

$ parter d test.txt 2

To reassemble the file use:

$ parter a test.txt

TODO

  • Remove need to specify the original file name for reassembling.
  • Add flag to remove original file or part files depending on operation.

License

All Go source files are copyrighted and licensed under the terms of the MIT License. View LICENSE file for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assemble

func Assemble(original string) error

Assemble the original file from part files

func Break

func Break(filename string, count int64) error

Break the file into a number of smaller files.

func Chunk

func Chunk(filename string, size int64) error

Chunk the file into a number of smaller files with the provided files size.

func Guess

func Guess(directory string) (string, error)

Guess the name of the original file based on the presence of part files. ".part1" in particular. If the original file cannot be guess an empty string is returned.

func ToSize

func ToSize(size string) (int64, error)

ToSize converts a data volumn (i.e. 10K) string to an integer amount.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL