Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

fileop.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2005 by Stefano Barbato
00003     email                : [email protected]
00004 
00005     $Id: fileop_8h-source.html,v 1.4 2006-03-12 12:28:31 tat Exp $
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #ifndef _MIMETIC_OS_FILEOP_H
00017 #define _MIMETIC_OS_FILEOP_H
00018 #include <string>
00019 
00020 /**
00021   *@author 
00022   */
00023 namespace mimetic
00024 {
00025 
00026 /// Defines some file utility functions
00027 struct FileOp
00028 {
00029     typedef unsigned int uint;
00030     /* static funtions */
00031     static bool remove(const std::string&);
00032     static bool move(const std::string&, const std::string&);
00033     static bool exists(const std::string&);
00034 
00035     static uint size(const std::string&);
00036     static uint ctime(const std::string&); // creation time
00037     static uint atime(const std::string&); // last time accessed(r/w)
00038     static uint mtime(const std::string&); // last time written
00039 };
00040 
00041 }
00042 
00043 
00044 #endif
00045