nestedpath

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package nestedpath can be used for building nested file path for an integer ID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(id uint64) string

Path returns graph DB directory path. The path is generated by converting id parameter to string with at least 9 digits (smaller numbers are padded with zeroes), then splitted by 3 digits which assures maximum of 1000 DBs in one directory. '.db' is added as a suffix to avoid name collisions when creating subdirectories. Examples: 1 --> 000/000/001.db 1000 -> 000/001/000.db 1000000000 -> 100/000/000/0.db

Types

This section is empty.

Jump to

Keyboard shortcuts

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