[][src]Crate pathsep

A small macro that gives us the path separator of the target system

This can be used in conjunction with include!(..) or include_str!(..) and concat!(..) to build paths.

Examples

This example is not tested
#[macro_use] extern crate pathsep;

include!(concat!(env!("OUT_DIR"), path_separator!(), "generated.rs"));

The same can be more succinctly written as:

This example is not tested
#[macro_use] extern crate pathsep;

include!(path_join!(env!("OUT_DIR"), "generated.rs"));

Macros

join_path

Join a path with the correct path separator

path_separator

Returns the path separator of the target system as a string.