glob.h 687 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <sys/cdefs.h>
  8. #include <sys/types.h>
  9. __BEGIN_DECLS
  10. typedef struct {
  11. size_t gl_pathc;
  12. char** gl_pathv;
  13. size_t gl_offs;
  14. } glob_t;
  15. #define GLOB_APPEND (1 << 0)
  16. #define GLOB_DOOFS (1 << 1)
  17. #define GLOB_ERR (1 << 2)
  18. #define GLOB_MARK (1 << 3)
  19. #define GLOB_NOCHECK (1 << 4)
  20. #define GLOB_NOESCAPE (1 << 5)
  21. #define GLOB_NOSORT (1 << 6)
  22. #define GLOB_ABORTED 1
  23. #define GLOB_NOMATCH 2
  24. #define GLOB_NOSPACE 3
  25. int glob(char const* pattern, int flags, int (*errfunc)(char const* epath, int eerrno), glob_t* pglob);
  26. void globfree(glob_t* pglob);
  27. __END_DECLS