Go to the documentation of this file.
28 #ifndef CASA_DIRECTORY_H
29 #define CASA_DIRECTORY_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/OS/Path.h>
34 #include <casacore/casa/OS/File.h>
38 template<
class T>
class Vector;
175 Bool setUserWritePermission =
True)
const;
177 Bool setUserWritePermission =
True)
const;
243 Bool setUserWritePermission)
const
245 copy (
Path(target), overwrite, setUserWritePermission);
void remove()
Remove a directory.
virtual Int64 size() const
Return the total size of everything in the Directory.
Bool isEmpty() const
Check if directory is empty.
void removeFiles()
Remove all files in the directory except subdirectories.
void removeRecursive(Bool keepDir=False)
Remove the directory and its contents (recursively in all subdirectories).
void copyRecursive(const String &target) const
Copy a directory recursively in a manual way.
Bool isNFSMounted() const
Check if a directory is mounted via NFS or not.
File itsFile
This variable is used when a symbolic link is given to be a directory.
void checkPath()
Check if the path defines a directory.
Directory(const Path &name)
Create a directory object for a file with the given path name.
Directory(const Directory &that)
Copy constructor (copy semantics).
uInt freeSpaceInMB() const
uInt nEntries() const
Return the number of entries in the directory (not counting.
static Vector< String > shellExpand(const Vector< String > &files, Bool stripPath=False)
For each element of files, find all file names matching it using shell file-expansion rules.
void move(const Path &target, Bool overwrite=True)
Move the directory to the target path using the system command mv.
this file contains all the compiler specific defines
Directory & operator=(const Directory &that)
Assignment (copy semantics).
Directory(const File &name)
Vector< String > find(const Regex ®exp, Bool followSymLinks=False, Bool recursive=True) const
Find all files which whose names match regex.
void create(Bool overwrite=True)
Create the directory.
Directory(const String &name)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
void copy(const Path &target, Bool overwrite=True, Bool setUserWritePermission=True) const
Copy the directory and its contents (recursively) to the target path using the system command cp -r.
Directory()
Sets the path on the current working directory.
Double freeSpace() const
Get the amount of free space (in bytes) on the file system this directory is on.