Go to the documentation of this file.
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/OS/Path.h>
34 #include <casacore/casa/BasicSL/String.h>
296 void getstat (
void* buf)
const;
323 #if !defined(AIPS_NOLARGEFILE)
325 # if !defined(_LARGEFILE64_SOURCE)
326 # define _LARGEFILE64_SOURCE
329 #if defined(AIPS_DARWIN) || defined(AIPS_BSD)
330 # define fileFSTAT fstat
331 # define fileLSTAT lstat
332 # define fileSTAT stat
333 # define fileSTATFS statfs
335 # define fileFSTAT fstat64
336 # define fileLSTAT lstat64
337 # define fileSTAT stat64
338 # define fileSTATFS statfs64
341 # define fileFSTAT fstat
342 # define fileLSTAT lstat
343 # define fileSTAT stat
344 # define fileSTATFS statfs
Bool isSocket() const
Check if the file is a socket.
String modifyTimeString() const
Return the time when the file was last modified as a 26-characters String of the form: Thu Feb 3 13:4...
uInt accessTime() const
Time related fucnctions: Return the time when the file was last accessed in seconds since 00:00:00 GM...
Bool canCreate() const
Check if a file can be created.
Bool exists() const
Check if the file exists.
@ NOT_OVERWRITABLE
file exists but cannot be overwritten
uInt readPermissions() const
Return the permissions as a decimal value.
static Path newUniqueName(const String &directory, const String &prefix)
Create a new unique path name in the specified directory, with the specified prefix and random traili...
void removeSymLinks()
This function is used by RegularFile and Directory to remove all the links which,...
String statusChangeTimeString() const
return the time when the file status was last changed as a 26-characters String of the form: Thu Feb ...
@ NOT_CREATABLE
file does not exist but cannot be created
static Path newUniqueName(const String &directory)
Create a new unique filename without a prefix.
uInt modifyTime() const
Return the time when the file was last modified in seconds since 00:00:00 GMT Jan 1,...
File & operator=(const File &that)
Assignment (copy semantics).
Bool isBlockSpecial() const
Check if the file is a block special file.
const Path & path() const
Returns the pathname of the file.
static std::atomic< uInt > uniqueSeqnr_p
A sequence number to generate unique file names.
void getstat(void *buf) const
Get the lstat of this file.
void checkTarget(Path &targetName, Bool overwrite, Bool forDirectory=False) const
Check if the new path for a copy or move is valid.
Path itsPath
Full pathname of the file.
File()
Construct a File object whose Path is set to the current working directory.
Bool isPipe() const
Check if the file is a pipe.
long userID() const
Return the userID of the file.
void setPermissions(uInt permissions)
Set permission with perm.
int mylstat(const char *path, void *buf) const
Define a function for lstat.
this file contains all the compiler specific defines
Bool isSymLink() const
Check if the file is a symbolic link.
@ OVERWRITABLE
file exists and can be overwritten
Bool isDirectory(Bool followSymLink=True) const
Check if the file is a directory.
TableExprNode time(const TableExprNode &node)
String getFSType() const
Return the filesystem type.
Bool isReadable() const
Check if the file is readable.
String accessTimeString() const
Return the time when the file was last accessed as a 26-characters String of the form: Thu Feb 3 13:4...
File(const File &that)
Copy constructor (copy semantics).
Bool isExecutable() const
Check if the file is executable.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
@ CREATABLE
file does not exist and is creatable
virtual Int64 size() const
Return the size of the file.
Bool isWritable() const
Check if the file is writable.
void touch()
Update access time and modification time of a file.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
long groupID() const
Return the groupID of the file.
FileWriteStatus getWriteStatus() const
get write status of the file.
Bool isRegular(Bool followSymLink=True) const
Check if the file is a regular file.
void touch(uInt time)
Update access time and modification time of a file.
Bool isCharacterSpecial() const
Check if the file is a character special file.
void getstat(const File &file, void *buf) const
Get the lstat of a file.
File(const Path &path)
Construct a File object whose Path is set to the given Path.
uInt statusChangeTime() const
Return the time when the file status was last changed in seconds since 00:00:00 GMT Jan 1,...