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