Luna/libluna/include/luna/CPath.h

30 lines
680 B
C
Raw Permalink Normal View History

/**
* @file CPath.h
* @author apio (cloudapio.eu)
* @brief Basic operations on paths using C-style strings.
*
* @copyright Copyright (c) 2023, the Luna authors.
*
*/
#pragma once
2023-03-28 17:47:47 +00:00
extern "C"
{
/**
* @brief Get the base name of a path.
*
* @param path The path to use. This will be modified.
* @return char* A pointer to the base name (usually points inside path).
*/
char* basename(char* path);
/**
* @brief Get the parent directory of a path.
*
* @param path The path to use. This will be modified.
* @return char* A pointer to the directory (usually points inside path).
*/
char* dirname(char* path);
2023-03-28 17:47:47 +00:00
}