Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 506 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 506 Bytes

filepath

A KCL package that helps you work with file paths. It provides functions to handle file paths in a safe and consistent way.

Installation

To install this package, run the following command:

kcl mod add oci://ghcr.io/appthrust/kcl/filepath

Usage

dir()

The dir() function returns the directory name of a path, similar to Python's os.path.dirname().

import filepath

# Basic usage
dir = filepath.dir("/home/user/file.txt")  # Returns "/home/user"