filename

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package filename provides utilities for encoder.

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupted = errors.New("file name corrupt")

ErrCorrupted is returned if a provided encoded filename cannot be decoded.

View Source
var ErrUnsupported = errors.New("file name possibly generated by future version of rclone")

ErrUnsupported is returned if a provided encoding may come from a future version or the file name is corrupt.

Functions

func Decode

func Decode(s string) (string, error)

Decode an encoded string.

func DecodeBytes added in v1.55.0

func DecodeBytes(table byte, data []byte) (string, error)

DecodeBytes will decode raw id and data values.

func Encode

func Encode(s string) string

Encode will encode the string and return a base64 (url) compatible version of it. Calling Decode with the returned string should always succeed. It is not a requirement that the input string is valid utf-8.

func EncodeBytes added in v1.55.0

func EncodeBytes(s string) (table byte, payload []byte)

EncodeBytes will compress the given string and return a table identifier and a payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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