Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers path.h Source File

path.h

Go to the documentation of this file.
00001 /**
00002  * @file path.h
00003  * @brief Path manipulation helper functions
00004  *
00005  * @section License
00006  *
00007  * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022  *
00023  * @author Oryx Embedded SARL (www.oryx-embedded.com)
00024  * @version 1.7.6
00025  **/
00026 
00027 #ifndef _PATH_H
00028 #define _PATH_H
00029 
00030 //Dependencies
00031 #include "os_port.h"
00032 
00033 //Path manipulation helper functions
00034 bool_t pathIsAbsolute(const char_t *path);
00035 bool_t pathIsRelative(const char_t *path);
00036 
00037 const char_t *pathFindFileName(const char_t *path);
00038 
00039 void pathCanonicalize(char_t *path);
00040 
00041 void pathAddSlash(char_t *path, size_t maxLen);
00042 void pathRemoveSlash(char_t *path);
00043 
00044 void pathCombine(char_t *path, const char_t *more, size_t maxLen);
00045 
00046 bool_t pathMatch(const char_t *path, const char_t* pattern);
00047 
00048 #endif
00049