• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

file.h

00001 #ifndef file_h
00002 #define file_h
00003 
00004 /*+
00005 ________________________________________________________________________
00006 
00007  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
00008  Author:        Nanne Hemstra
00009  Date:          January 2010
00010  Contents:      File utitlities
00011  RCS:           $Id: file.h,v 1.8 2010-11-19 03:59:09 cvsnanne Exp $
00012 ________________________________________________________________________
00013 
00014 -*/
00015 
00016 #include "gendefs.h"
00017 #include "timefun.h"
00018 
00019 
00022 namespace File
00023 {
00024     mGlobal bool        exists(const char*);
00025     mGlobal bool        isEmpty(const char*);
00026     mGlobal bool        isFile(const char*);
00027     mGlobal bool        isDirectory(const char*);
00028 
00029     mGlobal const char* getCanonicalPath(const char*);
00030     mGlobal const char* getRelativePath(const char* reltodir,const char* fnm);
00031 
00032     mGlobal bool        createLink(const char* from,const char* to);
00033     mGlobal bool        isLink(const char*);
00034     mGlobal const char* linkTarget(const char* linkname);
00035 
00036     mGlobal bool        isWritable(const char*);
00037     mGlobal bool        makeWritable(const char*,bool recursive,bool yesno);
00038     mGlobal bool        setPermissions(const char*,const char* perms,
00039                                        bool recursive);
00040 
00041     mGlobal bool        createDir(const char*); 
00042     mGlobal bool        rename(const char* oldname,const char* newname);
00043     mGlobal bool        copy(const char* from,const char* to);
00044     mGlobal bool        remove(const char*);
00045     mGlobal bool        saveCopy(const char* from,const char* to);
00046     mGlobal bool        copyDir(const char* from,const char* to);
00047     mGlobal bool        removeDir(const char*);
00048 
00049     mGlobal int         getKbSize(const char*);
00051 
00052     mGlobal const char* timeCreated(const char* filenm,
00053                                     const char* fmt=Time::defDateTimeFmt());
00054     mGlobal const char* timeLastModified(const char* filenm,
00055                                     const char* fmt=Time::defDateTimeFmt());
00056     mGlobal od_int64    getTimeInSeconds(const char*); 
00057 
00058     mGlobal const char* getCurrentPath();
00059     mGlobal const char* getHomePath();
00060     mGlobal const char* getTempPath();
00061 
00062 } // namespace File
00063 
00064 
00065 #endif

Generated on Tue Nov 30 2010 for Basic by  doxygen 1.7.1