repr

package
v0.0.0-...-01ee8fb Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package repr contains functions useful for serializing and deserializing directory listing structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalDir

func MarshalDir(listing []*fs.FileInfo) (d []byte, err error)

MarshalDir turns a directory listing into bytes that can later be used with UnmarshalDir. Note that ContainingDevice fields are lost.

The input array may be modified.

func MarshalFile

func MarshalFile(contents []byte) (f []byte, err error)

MarshalFile encodes the supplied file contents into bytes that can later be used with UnmarshalFile. The input array may be modified.

func UnmarshalDir

func UnmarshalDir(d []byte) (listing []*fs.FileInfo, err error)

UnmarshalDir recovers a list of directory entries from bytes previously returned by MarshalDir.

func UnmarshalFile

func UnmarshalFile(f []byte) (contents []byte, err error)

UnmarshalFile recovers file contents previously encoded with MarshalFile.

Types

This section is empty.

Directories

Path Synopsis
Package repr_proto is a generated protocol buffer package.
Package repr_proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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