Skip to content
synesissoftwarePublic

About

Path parsing library (for C and C++)

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libpath

Path parsing library (for C and C++)

C C++ License GitHub release Last Commit CI

Table of Contents

Introduction

libpath is a small, standalone library, implemented in C with a C and a C++ API, that provides file-system path parsing and comparison, for platform-dependent - Unix and Windows - and platform-independent path manipulation. It is intended to be useful for application-level programming as well as a basis for other libraries.

Developer Experience

Need: a C compiler and CMake 3.20+. Tests and examples also need STLSoft 1.11.5 or later and xTests 0.29 or later. The library itself needs only the C standard library (and the C++ standard library for the C++ API).

Build:

./prepare_cmake.sh
./build_cmake.sh

Try:

./run_all_unit_tests.sh
./run_all_examples.sh

Simplest use (C):

#include <libpath/parse.h>

libpath_PathDescriptor_t desc;

libpath_Parse_ParsePathFromCStyleString("/tmp/a", 0, &desc, 0, NULL, NULL);
int const absolute = libpath_ParseResult_IsPathAbsolute(&desc);

Simplest use (C++):

#include <libpath/parse.hpp>

libpath::parsing::PathDescriptor_t desc;

libpath::parsing::parse_path_from_cstyle_string("/tmp/a", 0, &desc, 0, nullptr);
int const absolute = libpath_ParseResult_IsPathAbsolute(&desc);

Read next: INSTALL.md for installation, the examples directory for usage, and FAQ.md for common questions.

Installation

Detailed instructions - via CMake - are provided in the accompanying INSTALL.md file.

Components

  • Comparing API (C and C++);
  • Equating API (C and C++);
  • Parsing API (C and C++);

Examples

Examples are provided in the examples directory.

Project Information

Where to get help

GitHub Page

Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/libpath.

If you'd like to help out with the project, please raise an issue via GitHub Page - you'll be very welcome!

Dependencies

Proper Dependencies

libpath has no proper (i.e. runtime / build) dependencies outside the facilities of the C standard library and, for its C++ API, the C++ standard library.

Development Dependencies

In order to run the test programs, libpath has the following development dependencies:

Related projects

License

libpath is released under the 3-clause BSD license. See LICENSE for details.

About

Path parsing library (for C and C++)

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages