file

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveContents

func RemoveContents(dir string) error

RemoveContents removes all contents of a directory but keeps the directory itself.

Origin:

https://stackoverflow.com/questions/33450980/golang-remove-all-contents-of-a-directory/33451503#33451503
https://stackoverflow.com/users/221700/peterso

Changes:

  • Migrate to cage/io.CloseOrStderr
  • Migrate to cage/os/file.RemoveAllSafer
  • Migrate to cage/os/file.ValidateRemove
  • Migrate to github.com/pkg/errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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