Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
void UsePlatformFileSeparator(char *value_s)
Replace any occurrences of // in a string with the platform-specific file separator.
bool SetCurrentWorkingDirectory(const char *const path_s)
Set the current working directory.
char GetFileSeparatorChar(void)
Get the platform-specific file separator.
char * GetCurrentWorkingDirectory(void)
Get the current working directory.
bool IsDirectory(const char *const path_s)
Check whether the given path refers to a directory.
bool CopyToNewFile(const char *const src_filename_s, const char *const dest_filename_s, void(*callback_fn)(void))
Copy the content of one file to another.
char * GetPathOnly(const char *const full_path_to_file_s)
Get the path to the parent directory only from a given path.
char * MakeFilename(const char *const path_s, const char *const filename_s)
Construct a filename.
char * SetFileExtension(const char *const filename_s, const char *const extension_s, bool replace_flag)
Generate a new filename by adding an extension to a filename.
const char * GetPluginPattern(void)
Get the platform-specific string for the a plugin.
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
void InitFileInformation(FileInformation *info_p)
Initialise a FileInformation ready for use.
char * GetHomeDirectory(void)
Get the current user's home directory.
bool EnsureDirectoryExists(const char *const path_s)
Makes sure that a given directory path exists.
bool DoesFileExist(const char *const path_s)
Check if a file/directory exists.
LinkedList * GetMatchingFiles(const char *const pattern_s, const bool full_path_flag)
Get files that match a given pattern.
bool IsPathValid(const char *const path_s)
Check whether a given file/directory exists.
bool IsPathAbsolute(const char *const path_s)
Check whether a given path is absolute.
const char * GetCurrentDirectoryString(void)
Get the platform-specific string for the current directory.
bool DeterminePathAndFile(const char *const full_path_s, char **const path_ss, char **const filename_ss)
Extract the parent path and filename only from a given path.
const char * GetParentDirectory(void)
Get the platform-specific string for the parent directory.
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
char * GetFilenameOnly(const char *const full_path_to_file_s)
Get the filename only from a given path.
bool RemoveFile(const char *const path_s)
Delete a file.