47#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
48# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
51#ifndef PLIBSYS_HEADER_PDIR_H
52#define PLIBSYS_HEADER_PDIR_H
PDirEntryType_
Directory entry types.
@ P_DIR_ENTRY_TYPE_FILE
File.
@ P_DIR_ENTRY_TYPE_DIR
Directory.
@ P_DIR_ENTRY_TYPE_OTHER
Other.
struct PDir_ PDir
Directory opaque data structure.
P_LIB_API void p_dir_entry_free(PDirEntry *entry)
Frees PDirEntry object.
P_LIB_API pboolean p_dir_is_exists(const pchar *path)
Checks whether a directory exists or not.
struct PDirEntry_ PDirEntry
Structure with directory entry information.
P_LIB_API pboolean p_dir_rewind(PDir *dir, PError **error)
Resets a directory entry pointer.
P_LIB_API void p_dir_free(PDir *dir)
Frees PDir object.
P_LIB_API PDir * p_dir_new(const pchar *path, PError **error)
Creates a new PDir object.
P_LIB_API pboolean p_dir_create(const pchar *path, pint mode, PError **error)
Creates a new directory on a filesystem.
P_LIB_API PDirEntry * p_dir_get_next_entry(PDir *dir, PError **error)
Gets the next directory entry info.
P_LIB_API pboolean p_dir_remove(const pchar *path, PError **error)
Removes an empty directory.
P_LIB_API pchar * p_dir_get_path(const PDir *dir)
Gets the original directory path used to create a PDir object.
enum PDirEntryType_ PDirEntryType
Directory entry types.
struct PError_ PError
Opaque data structure for an error object.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
char pchar
Type for a char.
signed int pboolean
Type for a bool.
Structure with directory entry information.