"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/isc/win32/include/isc/dir.h" (4 Sep 2020, 1516 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dir.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef ISC_DIR_H
   13 #define ISC_DIR_H 1
   14 
   15 #include <stdbool.h>
   16 #include <stdlib.h>
   17 #include <windows.h>
   18 
   19 #include <isc/lang.h>
   20 #include <isc/platform.h>
   21 #include <isc/result.h>
   22 
   23 typedef struct {
   24     char        name[NAME_MAX];
   25     unsigned int    length;
   26     WIN32_FIND_DATA find_data;
   27 } isc_direntry_t;
   28 
   29 typedef struct {
   30     unsigned int   magic;
   31     char           dirname[PATH_MAX];
   32     isc_direntry_t entry;
   33     bool           entry_filled;
   34     HANDLE         search_handle;
   35 } isc_dir_t;
   36 
   37 ISC_LANG_BEGINDECLS
   38 
   39 void
   40 isc_dir_init(isc_dir_t *dir);
   41 
   42 isc_result_t
   43 isc_dir_open(isc_dir_t *dir, const char *dirname);
   44 
   45 isc_result_t
   46 isc_dir_read(isc_dir_t *dir);
   47 
   48 isc_result_t
   49 isc_dir_reset(isc_dir_t *dir);
   50 
   51 void
   52 isc_dir_close(isc_dir_t *dir);
   53 
   54 isc_result_t
   55 isc_dir_chdir(const char *dirname);
   56 
   57 isc_result_t
   58 isc_dir_chroot(const char *dirname);
   59 
   60 isc_result_t
   61 isc_dir_createunique(char *templet);
   62 /*
   63  * Use a templet (such as from isc_file_mktemplate()) to create a uniquely
   64  * named, empty directory.  The templet string is modified in place.
   65  * If result == ISC_R_SUCCESS, it is the name of the directory that was
   66  * created.
   67  */
   68 
   69 ISC_LANG_ENDDECLS
   70 
   71 #endif /* ISC_DIR_H */