Nut/OS  4.10.3
API Reference
stat.h
Go to the documentation of this file.
00001 #ifndef _SYS_STAT_H_
00002 #define _SYS_STAT_H_
00003 
00004 /*
00005  * Copyright (C) 2004-2005 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Copyright (c) 1982, 1986, 1989, 1993
00008  *      The Regents of the University of California.  All rights reserved.
00009  * (c) UNIX System Laboratories, Inc.
00010  * All or some portions of this file are derived from material licensed
00011  * to the University of California by American Telephone and Telegraph
00012  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00013  * the permission of UNIX System Laboratories, Inc.
00014  *
00015  * Redistribution and use in source and binary forms, with or without
00016  * modification, are permitted provided that the following conditions
00017  * are met:
00018  * 1. Redistributions of source code must retain the above copyright
00019  *    notice, this list of conditions and the following disclaimer.
00020  * 2. Redistributions in binary form must reproduce the above copyright
00021  *    notice, this list of conditions and the following disclaimer in the
00022  *    documentation and/or other materials provided with the distribution.
00023  * 3. Neither the name of the University nor the names of its contributors
00024  *    may be used to endorse or promote products derived from this software
00025  *    without specific prior written permission.
00026  *
00027  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00028  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00031  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00035  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00036  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00037  * SUCH DAMAGE.
00038  */
00039 
00060 #include <stdint.h>
00061 #include <time.h>
00062 
00067 
00071 struct stat {
00072     short st_ino;               
00073     uint8_t st_mode;             
00074     uint16_t st_nlink;           
00075     uint32_t st_size;             
00076     time_t st_mtime;            
00077 };
00078 
00079 #define S_ISDIR(m)  ((m) != 0)  
00080 #define S_ISREG(m)  ((m) == 0)  
00083 
00084 __BEGIN_DECLS
00085 /* */
00086 extern int stat(CONST char *path, struct stat *s);
00087 extern int fstat(int fh, struct stat *s);
00088 extern int mkdir(CONST char *path, int mode);
00089 __END_DECLS
00090 /* */
00091 #endif