dircheck

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package to check folder is valid to process or not.

Index

Constants

View Source
const (
	// Unspecific criteria, bypass option matching.
	Unspecific optEnum = iota
	// Allow the item to exist
	Allow
	// Allow the item to exist, and not allow other items
	AllowOnly
	// Not Allow the item to exist
	Reject
)

Variables

This section is empty.

Functions

func CheckFolder

func CheckFolder(folderPath string, opt DirectoryOpt) (bool, error)

Check the folder fulfill requirement of the given Directory option.

Types

type DirectoryOpt

type DirectoryOpt struct {
	// Option for given path has any sub-folder
	SubFolder optEnum

	// Option for given path has any image
	Image optEnum
}

The option for dircheck package.

func (*DirectoryOpt) Valid

func (opt *DirectoryOpt) Valid() bool

Check the DirOpt is valid for process, prevent contradiction among fields.

Jump to

Keyboard shortcuts

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