Type representing a path. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "set.h"
#include "types.h"
Go to the source code of this file.
Functions | |
static char * | path_tidy (const char *path, bool is_dir) |
Tidy a path for storage. | |
static void | path_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef) |
Destroy a Path - Implements ConfigSetType::destroy() -. | |
static int | path_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err) |
Set a Path by string - Implements ConfigSetType::string_set() -. | |
static int | path_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result) |
Get a Path as a string - Implements ConfigSetType::string_get() -. | |
static int | path_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) |
Set a Path config item by string - Implements ConfigSetType::native_set() -. | |
static intptr_t | path_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Get a string from a Path config item - Implements ConfigSetType::native_get() -. | |
static int | path_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Reset a Path to its initial value - Implements ConfigSetType::reset() -. | |
Variables | |
char * | HomeDir |
User's home directory. | |
const struct ConfigSetType | CstPath |
Config type representing a path. | |
Type representing a path.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file path.c.
|
static |
Tidy a path for storage.
path | Path to be tidied |
is_dir | Is the path a directory? |
ptr | Tidy path |
Expand ~
and remove junk like /./
Definition at line 58 of file path.c.
const struct ConfigSetType CstPath |
Config type representing a path.