GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#include <grass/config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <pwd.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | G_mkdir (const char *path) |
Creates a new directory. More... | |
int | G_is_dirsep (char c) |
Checks if a specified character is a valid directory separator character on the host system. More... | |
int | G_is_absolute_path (const char *path) |
Checks if a specified path looks like an absolute path on the host system. More... | |
char * | G_convert_dirseps_to_host (char *path) |
Converts directory separator characters in a string to the native host separator character (/ on Unix, \ on Windows) More... | |
char * | G_convert_dirseps_from_host (char *path) |
Converts directory separator characters in a string from the native host character to the GRASS separator character (/) More... | |
int | G_stat (const char *file_name, struct stat *buf) |
Get file status. More... | |
int | G_lstat (const char *file_name, struct stat *buf) |
Get file status. More... | |
int | G_owner (const char *path) |
Get owner id of path. More... | |
char* G_convert_dirseps_from_host | ( | char * | path | ) |
Converts directory separator characters in a string from the native host character to the GRASS separator character (/)
path | String to be converted |
Definition at line 105 of file paths.c.
References GRASS_DIRSEP, and HOST_DIRSEP.
char* G_convert_dirseps_to_host | ( | char * | path | ) |
Converts directory separator characters in a string to the native host separator character (/ on Unix, \ on Windows)
path | String to be converted |
Definition at line 83 of file paths.c.
References GRASS_DIRSEP, and HOST_DIRSEP.
int G_is_absolute_path | ( | const char * | path | ) |
Checks if a specified path looks like an absolute path on the host system.
path | String containing path to check |
Definition at line 62 of file paths.c.
References G_is_dirsep().
Referenced by COM_Set_font().
int G_is_dirsep | ( | char | c | ) |
Checks if a specified character is a valid directory separator character on the host system.
c | Character to check |
Definition at line 45 of file paths.c.
Referenced by G_is_absolute_path(), and G_parser().
int G_lstat | ( | const char * | file_name, |
struct stat * | buf | ||
) |
Get file status.
Returns information about the specified file.
file_name | file name, in the case of a symbolic link, the link itself is stat-ed, not the file that it refers to |
stat | pointer to structure filled with file information |
Definition at line 145 of file paths.c.
Referenced by G_recursive_remove(), and list_subgroups().
int G_mkdir | ( | const char * | path | ) |
Creates a new directory.
Creates a new directory with permissions 0777 (on Unix) or default permissions(?) on Windows.
path | String containing path of directory to be created |
Definition at line 27 of file paths.c.
Referenced by G_config_path(), G_make_mapset(), and V1_close_nat().
int G_owner | ( | const char * | path | ) |
int G_stat | ( | const char * | file_name, |
struct stat * | buf | ||
) |
Get file status.
Returns information about the specified file.
file_name | file name |
stat | pointer to structure filled with file information |
Definition at line 128 of file paths.c.
Referenced by G_get_available_mapsets(), G_mapset_permissions(), G_mapset_permissions2(), and G_owner().