stat.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef _SYS_STAT_H_
  2. #define _SYS_STAT_H_
  3. /*
  4. * Copyright (C) 2004-2005 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Copyright (c) 1982, 1986, 1989, 1993
  7. * The Regents of the University of California. All rights reserved.
  8. * (c) UNIX System Laboratories, Inc.
  9. * All or some portions of this file are derived from material licensed
  10. * to the University of California by American Telephone and Telegraph
  11. * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  12. * the permission of UNIX System Laboratories, Inc.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions
  16. * are met:
  17. * 1. Redistributions of source code must retain the above copyright
  18. * notice, this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the distribution.
  22. * 3. Neither the name of the University nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  27. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  32. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  33. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  34. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  35. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  36. * SUCH DAMAGE.
  37. */
  38. /*!
  39. * \file sys/stat.h
  40. * \brief File system status declarations.
  41. *
  42. * \verbatim
  43. *
  44. * $Log: stat.h,v $
  45. * Revision 1.1 2005/02/05 20:37:18 haraldkipp
  46. * Peanut added
  47. *
  48. *
  49. * \endverbatim
  50. */
  51. #include <time.h>
  52. /*!
  53. * \addtogroup xgFS
  54. */
  55. /*@{*/
  56. /*!
  57. * \brief File status structure.
  58. */
  59. struct stat {
  60. short st_ino; /*!< \brief Block number */
  61. u_char st_mode; /*!< \brief Mode flags */
  62. u_short st_nlink; /*!< \brief Number of links */
  63. u_long st_size; /*!< \brief Size */
  64. time_t st_mtime; /*!< \brief Time of last modification */
  65. };
  66. /*@}*/
  67. __BEGIN_DECLS
  68. /* */
  69. extern int stat(CONST char *path, struct stat *s);
  70. extern int fstat(int fh, struct stat *s);
  71. extern int mkdir(CONST char *path, int mode);
  72. __END_DECLS
  73. /* */
  74. #endif