Skip to content

The core directory copy module behind cubby's directory backups.

Notifications You must be signed in to change notification settings

joshgermon/cubcopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cubcopy 🧸

Cubcopy is a C library for copying files from one place to another. It is a highly simplified and barebones implementation of a file copying library. It is currently created for a very specific and specialised use case within Cubby to copy a lot of medium-size files and where a hardened and bullet-proof library is not required. However flexibility in filtering items and organisational configurations are a priority including hooks into the copying process.

Important

It is worth repeating with emphasis that this is a crude, tiny and simple implementation and was created to solve a specific problem in a hobby project

Usage

Below is a very simple example of how to use Cubcopy.

#include "cubcopy.h"

int main(int argc, char **argv) {
    char *src = argv[1];
    char *dest = argv[2];

    CopyOpts opts = {
        .include_only = "pdf" // Copies only .pdf files
    };

    // Recursively copies source to directory
    // Note: opts not required, cc_copy(src, dest, NULL);
    return cc_copy(src, dest, opts);
}

Library

You want to use Cubcopy? 🤔 Well, OK - The best package manager is a good ol' copy-paste. Add the source code to your project and #include it, then you're good to go.

About

The core directory copy module behind cubby's directory backups.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages