files

package
v0.0.0-...-0fe5c75 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

README

creamy-transcode/files

For when you just want to skeet files around ™

This package combines the inner creamy-transcode/files/drivers, automatically picking the correct file driver to use, if any.

Usage

Download

Configuration can vary by driver. See specific driver implementations for details.

err := files.Download("https://albinodrought.com/", "hi.html")
Upload

Configuration can vary by driver. See specific driver implementations for details.

err := files.Upload("hi.html", "https://albinodrought.com/")

Example

package main

import (
	"log"

	"github.com/AlbinoDrought/creamy-transcode/files"
)

func main() {
	err := files.Download("https://albinodrought.com/", "hi.html")
	if err != nil {
		log.Fatalf("failed to download: %v", err)
	}

	err = files.Upload("hi.html", "https://albinodrought.com/")
	if err != nil {
		log.Fatalf("failed to upload: %v", err)
	}
}

// Output: Nothing, it just worked :)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(source string, dest string) error

Download a file from the remote source to the local destination

func Upload

func Upload(source string, dest string) error

Upload a file from the local source to the remote destination

Types

This section is empty.

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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