Slice Tools
  • Home
  • SourceForge Page


  • libFoundation
  • Home
  • Class Hierarchy
  • Class List
  • Class Members
  • Examples


  • SourceForge.net Logo
     

    FileSystem.hh

    Go to the documentation of this file.
    00001 // $Id: FileSystem.hh,v 1.1 2005/07/29 02:55:15 mschatz Exp $
    00002 
    00005 
    00006 #ifndef FILESYSTEM_HH
    00007 #define FILESYSTEM_HH 1
    00008 
    00009 #include <unistd.h>
    00010 #include <stdio.h>
    00011 
    00012 #include <string>
    00013 #include <fstream>
    00014 #include "Exceptions.hh"
    00015 
    00017 
    00020 class FileSystem
    00021 {
    00022 public: 
    00023   FileSystem();
    00024   
    00025   // File functions
    00026   static bool doesFileExist(const char *pathname);
    00027   static bool isReadableFile(const char *filename);
    00028   static bool isExecutableFile(const char *filename);
    00029   static bool isWritableFile(const char *filename);
    00030   static bool isCreatableFile(const char *filename);
    00031 
    00032   static bool isDirectory(const char *dirname);
    00033   static bool isReadableDir(const char *dirname);
    00034   static bool isWritableDir(const char *dirname);
    00035   static bool isCreatableDir(const char *dirname);
    00036   static bool isCreatablePath(const char *pathname);
    00037 
    00038   static char * getAbsolutePath();
    00039   static int getPID();
    00040   static std::string getPIDString();
    00041 
    00042   static std::ofstream * openOutputFile(const std::string & filename);
    00043   static std::ifstream * openInputFile(const std::string & filename);
    00044 };
    00045 
    00046 #endif