memdir

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package memdir is used to create temporary directories while writing to the filesystem to handle security and concurrency issues.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScopedPath

func ScopedPath(path, subPath string) (string, error)

ScopedPath joins path with subpath, returning the result if and only if it is still within the original path. (Security measure to prevent '..' shenanigans)

Types

type SubPath

type SubPath struct {
	// contains filtered or unexported fields
}

func NewSubPath

func NewSubPath(subPath string) SubPath

func (SubPath) Extract

func (s SubPath) Extract(srcPath, dstPath string) error

type TmpDir

type TmpDir struct {
	// contains filtered or unexported fields
}

func NewTmpDir

func NewTmpDir(id string) *TmpDir

func (*TmpDir) Create

func (d *TmpDir) Create() error

func (*TmpDir) Path

func (d *TmpDir) Path() string

func (*TmpDir) Remove

func (d *TmpDir) Remove() error

Jump to

Keyboard shortcuts

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