Drizzled Public API Documentation

CSDirectory.h

00001 /* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
00002  *
00003  * PrimeBase Media Stream for MySQL
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018  *
00019  * Original author: Paul McCullagh (H&G2JCtL)
00020  * Continued development: Barry Leslie
00021  *
00022  * 2007-06-07
00023  *
00024  * CORE SYSTEM:
00025  * A basic directory.
00026  *
00027  */
00028 
00029 #pragma once
00030 #ifndef __CSDIRECTORY_H__
00031 #define __CSDIRECTORY_H__
00032 
00033 #include "CSDefs.h"
00034 #include "CSSys.h"
00035 #include "CSPath.h"
00036 #include "CSTime.h"
00037 #include "CSObject.h"
00038 #include "CSStream.h"
00039 
00040 class CSDirectory : public CSSysDir, public CSObject  {
00041 public:
00042   const char *name();
00043 
00044   bool isFile();
00045   
00046   off64_t getSize();
00047   
00048   void deleteEntry();
00049 
00050   void info(bool *is_dir, off64_t *size, CSTime *mod_time);
00051 
00052   bool exists();
00053 
00054   void print(CSOutputStream *out);
00055 
00056   friend class TDDirectory;
00057 
00058   static CSDirectory *newDirectory(CSPath *path);
00059   static CSDirectory *newDirectory(CSString *path);
00060   static CSDirectory *newDirectory(const char *path);
00061 
00062 };
00063 
00064 
00065 #endif