log4cplus  2.0.0
fileinfo.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 //  Copyright (C) 2012-2015, Vaclav Zeman. All rights reserved.
00004 //
00005 //  Redistribution and use in source and binary forms, with or without modifica-
00006 //  tion, are permitted provided that the following conditions are met:
00007 //
00008 //  1. Redistributions of  source code must  retain the above copyright  notice,
00009 //     this list of conditions and the following disclaimer.
00010 //
00011 //  2. Redistributions in binary form must reproduce the above copyright notice,
00012 //     this list of conditions and the following disclaimer in the documentation
00013 //     and/or other materials provided with the distribution.
00014 //
00015 //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
00016 //  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
00017 //  FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
00018 //  APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
00019 //  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
00020 //  DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
00021 //  OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
00022 //  ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
00023 //  (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
00024 //  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025 
00026 #if ! defined (LOG4CPLUS_HELPERS_FILEINFO_H)
00027 #define LOG4CPLUS_HELPERS_FILEINFO_H
00028 
00029 #include <log4cplus/config.hxx>
00030 
00031 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
00032 #pragma once
00033 #endif
00034 
00035 #include <log4cplus/helpers/timehelper.h>
00036 #ifdef LOG4CPLUS_HAVE_SYS_TYPES_H
00037 #include <sys/types.h>
00038 #endif
00039 
00040 
00041 namespace log4cplus { namespace helpers {
00042 
00045 struct LOG4CPLUS_EXPORT FileInfo
00046 {
00047     helpers::Time mtime;
00048     bool is_link;
00049     off_t size;
00050 };
00051 
00052 
00054 LOG4CPLUS_EXPORT int getFileInfo (FileInfo * fi, tstring const & name);
00055 
00056 
00057 } } // namespace log4cplus { namespace helpers {
00058 
00059 #endif // LOG4CPLUS_HELPERS_FILEINFO_H