28 #ifndef CASA_REGULARFILE_H
29 #define CASA_REGULARFILE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/OS/Path.h>
34 #include <casacore/casa/OS/File.h>
35 #include <casacore/casa/BasicSL/String.h>
151 Bool setUserWritePermission =
True)
const;
153 Bool setUserWritePermission =
True)
const;
191 Bool setUserWritePermission)
const
193 copy (
Path(target), overwrite, setUserWritePermission);
const Path & path() const
Returns the pathname of the file.
RegularFile(const File &file)
void move(const Path &target, Bool overwrite=True)
Move the file to the target path using the system command mv.
void remove()
Remove the file.
static void manualCopy(const String &source, const String &target)
Copy the file manually in case the cp command cannot be used.
RegularFile & operator=(const RegularFile ®ularFile)
Assignment (copy semantics).
RegularFile(const RegularFile ®ularFile)
Copy constructor (copy semantics).
RegularFile()
Default constructor sets path to.
void copy(const Path &target, Bool overwrite=True, Bool setUserWritePermission=True) const
Copy the file to the target path using the system command cp.
File itsFile
This variable is used when a symbolic link points to the file.
virtual Int64 size() const
Return the size of the file.
RegularFile(const Path &path)
Create a regular file object for a file with the given path name.
RegularFile(const String &string)
void create(Bool overwrite=True)
Create the regular file.
void checkPath()
Check if the path of the file is valid.
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.