![]() |
OpendTect 8.0
|
Interface for several file and directory related services. More...
Classes | |
| class | Permissions |
| File permissions class, should most often be a combination File::Permission flags on Unix, but uses directly file attributes for local files and directories on Windows, see SetFileAttributes / GetFileAttributes documentation. More... | |
| class | ViewPars |
Enumerations | |
| enum class | DirListType { AllEntriesInDir , FilesInDir , DirsInDir } |
| enum class | Permission { ReadOwner =0x4000 , WriteOwner =0x2000 , ExeOwner =0x1000 , ReadUser =0x0400 , WriteUser =0x0200 , ExeUser =0x0100 , ReadGroup =0x0040 , WriteGroup =0x0020 , ExeGroup =0x0010 , ReadOther =0x0004 , WriteOther =0x0002 , ExeOther =0x0001 } |
| enum class | SizeUnit { Bytes =0 , KB =1 , MB =2 , GB =3 , TB =4 , PB =5 , Auto =6 } |
| enum class | Type { File =0 , Directory =1 , SymLink =2 , Alias =3 , Shortcut =4 , Character =5 , Block =6 , Fifo =7 , Socket =8 , URI =9 , Other =9 , Unknown =10 } |
| enum class | 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, bool preserve=true, uiString *errmsg=nullptr, TaskRunner *=nullptr) |
| bool | copyDir (const char *from, const char *to, bool preserve=true, uiString *errmsg=nullptr, TaskRunner *=nullptr) |
| 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 () |
| od_int64 | getFileSize (const char *fnm, bool followlink=true) |
| BufferString | getFileSizeString (const char *fnm, File::SizeUnit=File::SizeUnit::Auto) |
| BufferString | getFileSizeString (od_int64 filesz, File::SizeUnit=File::SizeUnit::Auto) |
| BufferString | getHash (const char *, Crypto::Algorithm) |
| const char * | getHomePath () |
| od_int64 | getKbSize (const char *) |
| Permissions | getPermissions (const char *fnm) |
| Executor * | getRecursiveCopier (const char *from, const char *to, bool preserve=true) |
| Executor * | getRecursiveDeleter (const char *dirnm, const BufferStringSet *externallist=nullptr, bool filesonly=false) |
| const char * | getRelativePath (const char *reltodir, const char *fnm) |
| const char * | getRootPath (const char *path) |
| const char * | getSizeUnitString (SizeUnit) |
| const char * | getTempPath () |
| od_int64 | getTimeInMilliSeconds (const char *filenm, bool modif=true, bool followlink=true) |
| od_int64 | getTimeInSeconds (const char *filenm, bool modif=true, bool followlink=true) |
| bool | getTimes (const char *filenm, Time::FileTimeSet &, bool followlink=true) |
| Retrieve file timestamps. | |
| Type | getType (const char *, bool followlinks=false) |
| const char * | getUserAppDataPath () |
| const char * | getViewStyleString (ViewStyle) |
| void | hide (const char *fnm, bool yn) |
| 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 *fnm) |
| bool | isLocal (const char *) |
| bool | isReadable (const char *) |
| bool | isShortcut (const char *) |
| bool | isSymbolicLink (const char *) |
| bool | isSymLink (const char *) |
| bool | isSystem (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 *) |
| const char * | linkValue (const char *linkname) |
| bool | listDir (const char *, DirListType, BufferStringSet &fnames, const char *mask=nullptr) |
| bool | makeExecutable (const char *fnm, bool yn) |
| bool | makeReadOnly (const char *fnm, bool recursive) |
| void | makeRecursiveFileList (const char *dir, BufferStringSet &filelist, bool followlinks=false) |
| bool | makeWritable (const char *fnm, bool yn, bool recursive) |
| int | maxPathLength () |
| bool | parseEnum (const char *, SizeUnit &) |
| bool | parseEnum (const char *, ViewStyle &) |
| bool | parseEnum (const IOPar &, const char *, SizeUnit &) |
| bool | parseEnum (const IOPar &, const char *, ViewStyle &) |
| SizeUnit | parseEnumSizeUnit (const char *) |
| bool | parseEnumSizeUnit (const char *, SizeUnit &) |
| ViewStyle | parseEnumViewStyle (const char *) |
| bool | parseEnumViewStyle (const char *, ViewStyle &) |
| bool | putContent (const char *buf, int sz, const char *tofnm) |
| bool | putContent (const OD::String &, const char *tofnm) |
| bool | remove (const char *) |
| bool | removeDir (const char *) |
| bool | rename (const char *oldname, const char *newname, uiString *errmsg=nullptr) |
| bool | resize (const char *, od_int64) |
| bool | saveCopy (const char *from, const char *to, bool preserve=true) |
| bool | setExecutable (const char *, bool yn, bool recursive=false) |
| bool | setHiddenFileAttrib (const char *, bool yn) |
| only Windows local files | |
| bool | setPermissions (const char *, const Permissions &) |
| bool | setReadOnly (const char *fnm, bool recursive=false) |
| bool | setSystemFileAttrib (const char *, bool yn) |
| only Windows local files | |
| bool | setTimes (const char *filenm, const Time::FileTimeSet &, bool followlink=true) |
| Set file timestamps (if supported by OS) | |
| bool | setWritable (const char *, bool yn, bool recursive=false) |
| const EnumDefImpl< SizeUnit > & | SizeUnitDef () |
| const char ** | SizeUnitNames () |
| const char * | textFilesFilter () |
| const char * | timeCreated (const char *filenm, const char *fmt=Time::defDateTimeFmt(), bool followlink=true) |
| const char * | timeLastModified (const char *filenm, const char *fmt=Time::defDateTimeFmt(), bool followlink=true) |
| const char * | toString (SizeUnit) |
| const char * | toString (ViewStyle) |
| uiString | toUiString (SizeUnit) |
| uiString | toUiString (ViewStyle) |
| const EnumDefImpl< ViewStyle > & | ViewStyleDef () |
| const char ** | ViewStyleNames () |
| bool | waitUntilExists (const char *fnm, double maxwaittm, double *actualwaited) |
Variables | |
| const char * | SizeUnitKeys_ [] |
| const char * | ViewStyleKeys_ [] |
Interface for several file and directory related services.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| const char * File::allFilesFilter | ( | ) |
| const char * File::asciiFilesFilter | ( | ) |
| bool File::changeDir | ( | const char * | path | ) |
| bool File::checkDir | ( | const char * | fnm, |
| bool | forread, | ||
| uiString * | errmsg = nullptr ) |
checks if the parent directory of a file is readable/writable
| bool File::copy | ( | const char * | from, |
| const char * | to, | ||
| bool | preserve = true, | ||
| uiString * | errmsg = nullptr, | ||
| TaskRunner * | = nullptr ) |
| bool File::copyDir | ( | const char * | from, |
| const char * | to, | ||
| bool | preserve = true, | ||
| uiString * | errmsg = nullptr, | ||
| TaskRunner * | = nullptr ) |
| bool File::createDir | ( | const char * | ) |
| bool File::createLink | ( | const char * | from, |
| const char * | to ) |
will be a shortcut on Windows and a symbolic link on Unix
| bool File::exists | ( | const char * | ) |
always follows links, returns false if the link is broken
| BufferString File::findExecutable | ( | const char * | exenm, |
| const BufferStringSet & | paths, | ||
| bool | includesyspath = true ) |
| const char * File::getAbsolutePath | ( | const char * | dir, |
| const char * | relfnm ) |
| const char * File::getCanonicalPath | ( | const char * | ) |
| bool File::getContent | ( | const char * | , |
| BufferString & | ) |
| const char * File::getCurrentPath | ( | ) |
| od_int64 File::getFileSize | ( | const char * | fnm, |
| bool | followlink = true ) |
| BufferString File::getFileSizeString | ( | const char * | fnm, |
| File::SizeUnit | = File::SizeUnit::Auto ) |
| BufferString File::getFileSizeString | ( | od_int64 | filesz, |
| File::SizeUnit | = File::SizeUnit::Auto ) |
| BufferString File::getHash | ( | const char * | , |
| Crypto::Algorithm | ) |
| const char * File::getHomePath | ( | ) |
| od_int64 File::getKbSize | ( | const char * | ) |
| Permissions File::getPermissions | ( | const char * | fnm | ) |
| Executor * File::getRecursiveCopier | ( | const char * | from, |
| const char * | to, | ||
| bool | preserve = true ) |
| Executor * File::getRecursiveDeleter | ( | const char * | dirnm, |
| const BufferStringSet * | externallist = nullptr, | ||
| bool | filesonly = false ) |
| const char * File::getRelativePath | ( | const char * | reltodir, |
| const char * | fnm ) |
| const char * File::getRootPath | ( | const char * | path | ) |
| const char * File::getSizeUnitString | ( | SizeUnit | ) |
| const char * File::getTempPath | ( | ) |
| od_int64 File::getTimeInMilliSeconds | ( | const char * | filenm, |
| bool | modif = true, | ||
| bool | followlink = true ) |
| od_int64 File::getTimeInSeconds | ( | const char * | filenm, |
| bool | modif = true, | ||
| bool | followlink = true ) |
| bool File::getTimes | ( | const char * | filenm, |
| Time::FileTimeSet & | , | ||
| bool | followlink = true ) |
Retrieve file timestamps.
| Type File::getType | ( | const char * | , |
| bool | followlinks = false ) |
| const char * File::getUserAppDataPath | ( | ) |
| const char * File::getViewStyleString | ( | ViewStyle | ) |
|
inline |
| bool File::initTempDir | ( | ) |
| bool File::isDirectory | ( | const char * | ) |
| bool File::isDirEmpty | ( | const char * | ) |
| bool File::isEmpty | ( | const char * | ) |
| bool File::isExecutable | ( | const char * | ) |
| bool File::isFile | ( | const char * | ) |
|
inline |
| bool File::isHidden | ( | const char * | ) |
| bool File::isInUse | ( | const char * | fnm | ) |
|
inline |
| bool File::isLocal | ( | const char * | ) |
| bool File::isReadable | ( | const char * | ) |
| bool File::isShortcut | ( | const char * | ) |
true if the object points to a shortcut
| bool File::isSymbolicLink | ( | const char * | ) |
true if the object points to a symbolic link
| bool File::isSymLink | ( | const char * | ) |
true if the file points to a symbolic link, shortcut (Windows) or alias (macOS)
| bool File::isSystem | ( | const char * | ) |
| bool File::isURI | ( | const char * | ) |
| bool File::isWritable | ( | const char * | ) |
| const char * File::linkEnd | ( | const char * | linkname | ) |
'Final' destination of link protected against circular links
| const char * File::linkTarget | ( | const char * | ) |
| const char * File::linkValue | ( | const char * | linkname | ) |
| bool File::listDir | ( | const char * | , |
| DirListType | , | ||
| BufferStringSet & | fnames, | ||
| const char * | mask = nullptr ) |
|
inline |
|
inline |
| void File::makeRecursiveFileList | ( | const char * | dir, |
| BufferStringSet & | filelist, | ||
| bool | followlinks = false ) |
|
inline |
| int File::maxPathLength | ( | ) |
| bool File::parseEnum | ( | const char * | , |
| SizeUnit & | ) |
| bool File::parseEnum | ( | const char * | , |
| ViewStyle & | ) |
| SizeUnit File::parseEnumSizeUnit | ( | const char * | ) |
| bool File::parseEnumSizeUnit | ( | const char * | , |
| SizeUnit & | ) |
| ViewStyle File::parseEnumViewStyle | ( | const char * | ) |
| bool File::parseEnumViewStyle | ( | const char * | , |
| ViewStyle & | ) |
| bool File::putContent | ( | const char * | buf, |
| int | sz, | ||
| const char * | tofnm ) |
| bool File::putContent | ( | const OD::String & | , |
| const char * | tofnm ) |
| bool File::remove | ( | const char * | ) |
| bool File::removeDir | ( | const char * | ) |
If path is a link, the target directory is recursively removed, the link remains
| bool File::rename | ( | const char * | oldname, |
| const char * | newname, | ||
| uiString * | errmsg = nullptr ) |
| bool File::resize | ( | const char * | , |
| od_int64 | ) |
| bool File::saveCopy | ( | const char * | from, |
| const char * | to, | ||
| bool | preserve = true ) |
| bool File::setExecutable | ( | const char * | , |
| bool | yn, | ||
| bool | recursive = false ) |
| bool File::setHiddenFileAttrib | ( | const char * | , |
| bool | yn ) |
only Windows local files
| bool File::setPermissions | ( | const char * | , |
| const Permissions & | ) |
| bool File::setReadOnly | ( | const char * | fnm, |
| bool | recursive = false ) |
| bool File::setSystemFileAttrib | ( | const char * | , |
| bool | yn ) |
only Windows local files
| bool File::setTimes | ( | const char * | filenm, |
| const Time::FileTimeSet & | , | ||
| bool | followlink = true ) |
Set file timestamps (if supported by OS)
| bool File::setWritable | ( | const char * | , |
| bool | yn, | ||
| bool | recursive = false ) |
| const EnumDefImpl< SizeUnit > & File::SizeUnitDef | ( | ) |
| const char ** File::SizeUnitNames | ( | ) |
| const char * File::textFilesFilter | ( | ) |
| const char * File::timeCreated | ( | const char * | filenm, |
| const char * | fmt = Time::defDateTimeFmt(), | ||
| bool | followlink = true ) |
| const char * File::timeLastModified | ( | const char * | filenm, |
| const char * | fmt = Time::defDateTimeFmt(), | ||
| bool | followlink = true ) |
| const char * File::toString | ( | SizeUnit | ) |
| const char * File::toString | ( | ViewStyle | ) |
| const EnumDefImpl< ViewStyle > & File::ViewStyleDef | ( | ) |
| const char ** File::ViewStyleNames | ( | ) |
| bool File::waitUntilExists | ( | const char * | fnm, |
| double | maxwaittm, | ||
| double * | actualwaited ) |
|
extern |
|
extern |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025