Skip to main content
<title>File System Hierarchy</title>
FileHikerDevChangelog   Issues   Notes

FileHikerDev Project v0.4.1

1. Overview 🔗

Synopsis:

  • Slogan : Directory crawler Python package. It finds any file system item´s neighbour, one by one, walking either forward or backward
  • Description : FileHiker is a Python package to find the right or left neighbour for any filesystem item inside a given 'base folder'. It finds either the next or the previous neighbour, depending on a direction flag. If the given target does not exist, it tries to find a sensible neighbour anyway.
  • Particularities:
    • It walks forward and backward equally and symmetrically
    • It is suited for huge file system hierarchies due to it´s memory saving behaviour using internally only one single-level directory listing at a time
  • License : BSD 3-Clause, see src/filehiker/license.txt
  • Copyright : © 2025 – 2026 Norbert C. Maier
  • System : Written and tested with Python 3.13 on Windows. Should also work on Linux/Mac, just this is yet to be tested
  • Dependencies : None
  • Missing features : Symlink handling
  • Motivation : I wanted walk a drive file by file to build a database of the files. It takes about 20 hours for 2 million files, including some little payload per file, like calculating the file hash.
  • Development Status : Applicable

2. Installation 🔗

Install the package in your Python via pip (1) either as user installation from PyPi.org or (2) as editable development installation if you have the sources on your machine

2.1 User Installation 🔗

Use one of the following commandline prompts (the .exe is Windows specific):

 > pip.exe install filehiker
 > pip.exe install -U filehiker
 > python.exe -m pip install filehiker
 > python.exe -m pip install -U filehiker

2.2 Development Installation 🔗

How to do so?

  1. Get the filehikerdev project folder on your local drive, possibly by cloning it from GitLab
  2. In the console change directory to the project´s root folder filehikerdev
  3. Issue one of the following commands — Don´t miss the trailing dot for 'current folder'!
    • filehikerdev> pip.exe install -e .
    • filehikerdev> python.exe -m pip install -e .
  4. You should see a console like in the following screenshot

Screenshot 20260814°0721
Install FileHiker editable development version. Note the trailing dot in the first line! (txt)

3. UI (User Interface) 🔗

Though FileHiker is a library to be used from other Python code, it nevertheless provides a bit interactivity from the console:

  • Output some status info:
     > python.exe -m filehiker
    
  • Perform a selftest on the built-in test-folder:
     > python.exe -m filehiker s
    
  • Perform a selftest on your CWD, current working dir:
     > python.exe -m filehiker t
    

By the way. There is a curious restriction, mentioned just for sake of completeness. Command python.exe -m filehiker must not be issued from the folder, where the filehiker.py resides. If you do so, just nothing happens, which is due to Python´s package handling. The case is difficult to catch from the code. The effort implementing the case is not worth the gain. As a user, you will never see this folder anyway, and as a developer you can easily just avoid it.

4. API (Application Programmers Interface) 🔗

  • Constructor filehiker.FileHiker(basepath, direction, ignorewcs, verbose) where
    • basepath — Optional string to tell to which folder the scanning is confined. Default is '' (empty), which shall translate to the folder from where python.exe was called
    • direction — Optional boolean, telling whether to go forward or backward. Default is True, means forward to the right, False means backward to the left
    • ignorewcs — Optional list with wildcard patterns for files and folders to ignore. Default is a list with patterns like .git, __*__, etc. See the list in the source filehiker.py at about line 50
    • verbose - Flag to tell whether to print some output or not. Default is False
  • Method find_neighbour(target) where target is a string with a path pointing to the current item, from which it´s neighbour is wanted. Returns a string with the found neighbour.
  • Method get_BasePath() — Returns the current base path
  • Method get_Direction() — Returns the current direction flag
  • Method get_Verbose() — Returns the current verbose flag
  • Method get_IgnoreList() — Returns the current ignore list
  • Static method normaleis() — Takes a path and returns it normalized, means with slashes and one trailing slash for directories
  • Method set_BasePath(basepath) — Takes a string with the new base path to be set
  • Method set_Direction(direction) — Takes a boolean with the new direction to be set
  • Method set_Verbose(verbose) — Takes a boolean with the new verbose flag to be set
  • Method set_IgnoreList(ignorelist) — Takes a list with the new ignore patterns to be set

5. Usage 🔗

Here is a minimalistic example how to use FileHiker:

 # Since no base folder is defined, the CWD, current working dir, is used as such
 import filehiker
 fhk = filehiker.FileHiker()
 offset = ''                             # No offset means just the base folder itself
 neighbour = fhk.find_neighbour(offset)  # The right neighbour of the base folder is it´s first entry
 print(f'Right neighbour = {neighbour}'  # Shows the first entry in the base folder

6. Development Folder Structure 🔗

The FileHiker package uses the 'Src-Layout' folder structure, one of three common package layout options. Find more about package folder structures in the ZanaFacils Notes file, subchapter About Python Package Layouts.

filehikerdev
├── docs
│   └── …
├── src
│   └── filehiker
│       ├── __init__.py
│       ├── filehiker.py
│       └── subpkg
│           ├── __init__.py
│           └── module2.py
├── README.md
└── pyproject.toml
 Icon 20250816°0849 Detailled information on Python packages is found on site 'Python Packages' - Frontpage [Py-Pkgs.org](https://py-pkgs.org/) [ref 20260817°1034] - Chapter [4. Package structure and distribution](https://py-pkgs.org/04-package-structure.html) [ref 20250816°0848]

 

 Icon 20250514°0821 Mistral quest [Python package documentation placement](https://chat.mistral.ai/chat/db251f65-bdb0-4cfe-b58a-3ddef93513b2) — Reasoning about where to place which documentation [ref 20260726°0842 📡]

7. Credits 🔗

 Icon 20260819°0731 The 'File System Hierarchy One' logo is made by Norbert with DrawIO, Inkscape and [jakearchibald.github.io/svgomg](https://jakearchibald.github.io/svgomg/) under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license

 

 Icon 20210508°1044 The license text was taken from [choosealicense.com/licenses/bsd-3-clause/](https://choosealicense.com/licenses/bsd-3-clause/)

 


8. Fineprint 🔗

   project 20250406°0711 FileHiker
   objtype     : Python package
   url         :
   title       : Filehiker
   summary     : Find filesystem item´s neighbour left or right
   status      : Applicable
   tags        :
   note        :
   ⬞
   repo 20260818°1414 FileHikerDev
   objtype     : Git repository
   canonical   : https://gitlab.com/normai/filehikerdev
   title       : FileHikerDev
   tags        :
   note        :
   ⬞

Page 20250406°0721 ⬞Ω

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filehiker-0.4.1.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filehiker-0.4.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file filehiker-0.4.1.tar.gz.

File metadata

  • Download URL: filehiker-0.4.1.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for filehiker-0.4.1.tar.gz
Algorithm Hash digest
SHA256 402e8afd21ed2ae63509f8173751a90a0a657a9d1f9498e4daa4914e76739eed
MD5 b7ed320482242c487b96d50f22e73801
BLAKE2b-256 d6966d79dbe10d60389f87ecff64366e0501de5f4fdd8b8c62af4339f338a5c4

See more details on using hashes here.

File details

Details for the file filehiker-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: filehiker-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for filehiker-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13e964029f85724a473b1865d4ffbe6840835e57fb1762ca5c90552c4d8a635e
MD5 c6cc723a5204bf3dbf5c36735c2ccd6e
BLAKE2b-256 ce8fad351c0f0779af6648e5f07cf74b1038abc361d2842128eb3d76d24586c9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.3.9.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page