diff options
| author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-05-13 17:18:43 +0200 | 
|---|---|---|
| committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-05-13 17:18:43 +0200 | 
| commit | e501c9a4bc230dab034571c2078a12a8a856c67a (patch) | |
| tree | 028c149597a194ec2220a60dc12db90a62c64669 /include/util | |
| parent | 7ce4b36d517ac5fade36240d293ff784ef6a9305 (diff) | |
Move directory iterator from libutil to libio
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/util')
| -rw-r--r-- | include/util/dir_iterator.h | 39 | ||||
| -rw-r--r-- | include/util/dir_tree_iterator.h | 46 | 
2 files changed, 0 insertions, 85 deletions
| diff --git a/include/util/dir_iterator.h b/include/util/dir_iterator.h deleted file mode 100644 index 4d7607f..0000000 --- a/include/util/dir_iterator.h +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: LGPL-3.0-or-later */ -/* - * dir_iterator.h - * - * Copyright (C) 2023 David Oberhollenzer <goliath@infraroot.at> - */ -#ifndef UTIL_DIR_ITERATOR_H -#define UTIL_DIR_ITERATOR_H - -#include "sqfs/predef.h" - -typedef struct { -	sqfs_s64 mtime; -	sqfs_u64 dev; -	sqfs_u64 rdev; -	sqfs_u32 uid; -	sqfs_u32 gid; -	sqfs_u16 mode; - -	char name[]; -} dir_entry_t; - -typedef struct dir_iterator_t { -	sqfs_object_t obj; - -	sqfs_u64 dev; - -	int (*next)(struct dir_iterator_t *it, -		    dir_entry_t **out); - -	int (*read_link)(struct dir_iterator_t *it, char **out); - -	int (*open_subdir)(struct dir_iterator_t *it, -			   struct dir_iterator_t **out); -} dir_iterator_t; - -dir_iterator_t *dir_iterator_create(const char *path); - -#endif /* UTIL_DIR_ITERATOR_H */ diff --git a/include/util/dir_tree_iterator.h b/include/util/dir_tree_iterator.h deleted file mode 100644 index 204f609..0000000 --- a/include/util/dir_tree_iterator.h +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: LGPL-3.0-or-later */ -/* - * dir_tree_iterator.h - * - * Copyright (C) 2023 David Oberhollenzer <goliath@infraroot.at> - */ -#ifndef UTIL_DIR_TREE_ITERATOR_H -#define UTIL_DIR_TREE_ITERATOR_H - -#include "util/dir_iterator.h" - -enum { -	DIR_SCAN_NO_SOCK = 0x0001, -	DIR_SCAN_NO_SLINK = 0x0002, -	DIR_SCAN_NO_FILE = 0x0004, -	DIR_SCAN_NO_BLK = 0x0008, -	DIR_SCAN_NO_DIR = 0x0010, -	DIR_SCAN_NO_CHR = 0x0020, -	DIR_SCAN_NO_FIFO = 0x0040, - -	DIR_SCAN_KEEP_TIME = 0x0100, -	DIR_SCAN_KEEP_UID = 0x0200, -	DIR_SCAN_KEEP_GID = 0x0400, -	DIR_SCAN_KEEP_MODE = 0x0800, - -	DIR_SCAN_ONE_FILESYSTEM = 0x1000, -	DIR_SCAN_NO_RECURSION = 0x2000, -	DIR_SCAN_MATCH_FULL_PATH = 0x4000, -}; - -typedef struct { -	sqfs_u32 flags; -	sqfs_u32 def_uid; -	sqfs_u32 def_gid; -	sqfs_u32 def_mode; -	sqfs_s64 def_mtime; -	const char *prefix; -	const char *name_pattern; -} dir_tree_cfg_t; - -dir_iterator_t *dir_tree_iterator_create(const char *path, -					 const dir_tree_cfg_t *cfg); - -void dir_tree_iterator_skip(dir_iterator_t *it); - -#endif /* UTIL_DIR_TREE_ITERATOR_H */ | 
