OpendTect  7.0
Classes | Enumerations | Functions | Variables
File Namespace Reference

Interface for several file and directory related services. More...

Classes

class  ViewPars
 

Enumerations

enum  DirListType { AllEntriesInDir , FilesInDir , DirsInDir }
 
enum  ViewStyle { Text , Table , Log , Bin }
 

Functions

const char * allFilesFilter ()
 
const char * asciiFilesFilter ()
 
bool changeDir (const char *path)
 
bool checkDir (const char *fnm, bool forread, uiString *errmsg=nullptr)
 
bool copy (const char *from, const char *to, BufferString *errmsg=0)
 
bool copyDir (const char *from, const char *to, BufferString *errmsg=0)
 
bool createDir (const char *)
 
bool createLink (const char *from, const char *to)
 
bool exists (const char *)
 
BufferString findExecutable (const char *exenm, const BufferStringSet &paths, bool includesyspath=true)
 
const char * getAbsolutePath (const char *dir, const char *relfnm)
 
const char * getCanonicalPath (const char *)
 
bool getContent (const char *, BufferString &)
 
const char * getCurrentPath ()
 
std::int64_t getFileSize (const char *fnm, bool followlink=true)
 bytes More...
 
BufferString getFileSizeString (const char *fnm)
 
BufferString getFileSizeString (std::int64_t fileszinkb)
 
const char * getHomePath ()
 
std::int64_t getKbSize (const char *)
 
ExecutorgetRecursiveCopier (const char *from, const char *to)
 
ExecutorgetRecursiveDeleter (const char *dirnm, const BufferStringSet *externallist=0, bool filesonly=false)
 
const char * getRelativePath (const char *reltodir, const char *fnm)
 
const char * getRootPath (const char *path)
 
const char * getTempPath ()
 
std::int64_t getTimeInMilliSeconds (const char *fnm, bool lastmodif=true)
 
std::int64_t getTimeInSeconds (const char *, bool modif=true)
 
const char * getUserAppDataPath ()
 
const char * getViewStyleString (ViewStyle)
 
bool hasSystemFileAttrib (const char *)
 
void hide (const char *, bool yn)
 only Windows More...
 
bool initTempDir ()
 
bool isDirectory (const char *)
 
bool isDirEmpty (const char *)
 
bool isEmpty (const char *)
 
bool isExecutable (const char *)
 
bool isFile (const char *)
 
bool isFileInUse (const char *fnm)
 
bool isHidden (const char *)
 
bool isInUse (const char *fnm)
 
bool isLink (const char *)
 
bool isReadable (const char *)
 
bool isURI (const char *)
 
bool isWritable (const char *)
 
bool launchViewer (const char *, const ViewPars &vp=ViewPars())
 
const char * linkEnd (const char *linkname)
 
const char * linkTarget (const char *linkname)
 Direct, first target. More...
 
const char * linkValue (const char *linkname)
 not sure why and when to use - used by zip More...
 
bool listDir (const char *, DirListType, BufferStringSet &fnames, const char *mask=0)
 
bool makeExecutable (const char *, bool yesno)
 
bool makeReadOnly (const char *fnm, bool recursive)
 
void makeRecursiveFileList (const char *dir, BufferStringSet &filelist, bool followlinks=false)
 
bool makeWritable (const char *, bool yesno, bool recursive)
 
bool parseEnum (const char *, ViewStyle &)
 
bool parseEnum (const IOPar &, const char *, ViewStyle &)
 
ViewStyle parseEnumViewStyle (const char *)
 
bool parseEnumViewStyle (const char *, ViewStyle &)
 
bool remove (const char *)
 
bool removeDir (const char *)
 
bool rename (const char *oldname, const char *newname, uiString *errmsg=nullptr)
 
bool resize (const char *, std::int64_t)
 
bool saveCopy (const char *from, const char *to)
 
bool setPermissions (const char *, const char *perms, bool recursive)
 
void setSystemFileAttrib (const char *, bool yn)
 
const char * textFilesFilter ()
 
const char * timeCreated (const char *filenm, const char *fmt=Time::defDateTimeFmt())
 
const char * timeLastModified (const char *filenm, const char *fmt=Time::defDateTimeFmt())
 
const char * toString (ViewStyle)
 
uiString toUiString (ViewStyle)
 
const EnumDefImpl< ViewStyle > & ViewStyleDef ()
 
const char ** ViewStyleNames ()
 
bool waitUntilExists (const char *fnm, double maxwaittm, double *actualwaited)
 

Variables

const char * ViewStyleKeys_ []
 

Detailed Description

Interface for several file and directory related services.

Enumeration Type Documentation

◆ DirListType

Enumerator
AllEntriesInDir 
FilesInDir 
DirsInDir 

◆ ViewStyle

Enumerator
Text 
Table 
Log 
Bin 

Function Documentation

◆ allFilesFilter()

const char* File::allFilesFilter ( )

◆ asciiFilesFilter()

const char* File::asciiFilesFilter ( )

◆ changeDir()

bool File::changeDir ( const char *  path)

◆ checkDir()

bool File::checkDir ( const char *  fnm,
bool  forread,
uiString errmsg = nullptr 
)

checks if the parent directory of a file is readable/writable

◆ copy()

bool File::copy ( const char *  from,
const char *  to,
BufferString errmsg = 0 
)

◆ copyDir()

bool File::copyDir ( const char *  from,
const char *  to,
BufferString errmsg = 0 
)

◆ createDir()

bool File::createDir ( const char *  )

◆ createLink()

bool File::createLink ( const char *  from,
const char *  to 
)

◆ exists()

bool File::exists ( const char *  )

◆ findExecutable()

BufferString File::findExecutable ( const char *  exenm,
const BufferStringSet paths,
bool  includesyspath = true 
)

◆ getAbsolutePath()

const char* File::getAbsolutePath ( const char *  dir,
const char *  relfnm 
)

◆ getCanonicalPath()

const char* File::getCanonicalPath ( const char *  )

◆ getContent()

bool File::getContent ( const char *  ,
BufferString  
)

◆ getCurrentPath()

const char* File::getCurrentPath ( )

◆ getFileSize()

std::int64_t File::getFileSize ( const char *  fnm,
bool  followlink = true 
)

bytes

◆ getFileSizeString() [1/2]

BufferString File::getFileSizeString ( const char *  fnm)

◆ getFileSizeString() [2/2]

BufferString File::getFileSizeString ( std::int64_t  fileszinkb)

◆ getHomePath()

const char* File::getHomePath ( )

◆ getKbSize()

std::int64_t File::getKbSize ( const char *  )

◆ getRecursiveCopier()

Executor* File::getRecursiveCopier ( const char *  from,
const char *  to 
)

◆ getRecursiveDeleter()

Executor* File::getRecursiveDeleter ( const char *  dirnm,
const BufferStringSet externallist = 0,
bool  filesonly = false 
)

◆ getRelativePath()

const char* File::getRelativePath ( const char *  reltodir,
const char *  fnm 
)

◆ getRootPath()

const char* File::getRootPath ( const char *  path)

◆ getTempPath()

const char* File::getTempPath ( )

◆ getTimeInMilliSeconds()

std::int64_t File::getTimeInMilliSeconds ( const char *  fnm,
bool  lastmodif = true 
)

◆ getTimeInSeconds()

std::int64_t File::getTimeInSeconds ( const char *  ,
bool  modif = true 
)

◆ getUserAppDataPath()

const char* File::getUserAppDataPath ( )

◆ getViewStyleString()

const char* File::getViewStyleString ( ViewStyle  )

◆ hasSystemFileAttrib()

bool File::hasSystemFileAttrib ( const char *  )

◆ hide()

void File::hide ( const char *  ,
bool  yn 
)

only Windows

◆ initTempDir()

bool File::initTempDir ( )

◆ isDirectory()

bool File::isDirectory ( const char *  )

◆ isDirEmpty()

bool File::isDirEmpty ( const char *  )

◆ isEmpty()

bool File::isEmpty ( const char *  )

◆ isExecutable()

bool File::isExecutable ( const char *  )

◆ isFile()

bool File::isFile ( const char *  )

◆ isFileInUse()

bool File::isFileInUse ( const char *  fnm)

◆ isHidden()

bool File::isHidden ( const char *  )

◆ isInUse()

bool File::isInUse ( const char *  fnm)

◆ isLink()

bool File::isLink ( const char *  )

◆ isReadable()

bool File::isReadable ( const char *  )

◆ isURI()

bool File::isURI ( const char *  )

◆ isWritable()

bool File::isWritable ( const char *  )

◆ launchViewer()

bool File::launchViewer ( const char *  ,
const ViewPars vp = ViewPars() 
)

◆ linkEnd()

const char* File::linkEnd ( const char *  linkname)

'Final' destination of link protected against circular links

◆ linkTarget()

const char* File::linkTarget ( const char *  linkname)

Direct, first target.

◆ linkValue()

const char* File::linkValue ( const char *  linkname)

not sure why and when to use - used by zip

◆ listDir()

bool File::listDir ( const char *  ,
DirListType  ,
BufferStringSet fnames,
const char *  mask = 0 
)

◆ makeExecutable()

bool File::makeExecutable ( const char *  ,
bool  yesno 
)

◆ makeReadOnly()

bool File::makeReadOnly ( const char *  fnm,
bool  recursive 
)

◆ makeRecursiveFileList()

void File::makeRecursiveFileList ( const char *  dir,
BufferStringSet filelist,
bool  followlinks = false 
)

◆ makeWritable()

bool File::makeWritable ( const char *  ,
bool  yesno,
bool  recursive 
)

◆ parseEnum() [1/2]

bool File::parseEnum ( const char *  ,
ViewStyle  
)

◆ parseEnum() [2/2]

bool File::parseEnum ( const IOPar ,
const char *  ,
ViewStyle  
)

◆ parseEnumViewStyle() [1/2]

ViewStyle File::parseEnumViewStyle ( const char *  )

◆ parseEnumViewStyle() [2/2]

bool File::parseEnumViewStyle ( const char *  ,
ViewStyle  
)

◆ remove()

bool File::remove ( const char *  )

◆ removeDir()

bool File::removeDir ( const char *  )

◆ rename()

bool File::rename ( const char *  oldname,
const char *  newname,
uiString errmsg = nullptr 
)

◆ resize()

bool File::resize ( const char *  ,
std::int64_t   
)

◆ saveCopy()

bool File::saveCopy ( const char *  from,
const char *  to 
)

◆ setPermissions()

bool File::setPermissions ( const char *  ,
const char *  perms,
bool  recursive 
)

◆ setSystemFileAttrib()

void File::setSystemFileAttrib ( const char *  ,
bool  yn 
)

◆ textFilesFilter()

const char* File::textFilesFilter ( )

◆ timeCreated()

const char* File::timeCreated ( const char *  filenm,
const char *  fmt = Time::defDateTimeFmt() 
)

◆ timeLastModified()

const char* File::timeLastModified ( const char *  filenm,
const char *  fmt = Time::defDateTimeFmt() 
)

◆ toString()

const char* File::toString ( ViewStyle  )

◆ toUiString()

uiString File::toUiString ( ViewStyle  )

◆ ViewStyleDef()

const EnumDefImpl< ViewStyle >& File::ViewStyleDef ( )

◆ ViewStyleNames()

const char** File::ViewStyleNames ( )

◆ waitUntilExists()

bool File::waitUntilExists ( const char *  fnm,
double  maxwaittm,
double *  actualwaited 
)

Variable Documentation

◆ ViewStyleKeys_

const char* File::ViewStyleKeys_[]
extern

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024