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
String getFSType() const
Return the filesystem type.
File(const Path &path)
Construct a File object whose Path is set to the given Path.
Bool canCreate() const
Check if a file can be created.
File & operator=(const File &that)
Assignment (copy semantics).
Bool isPipe() const
Check if the file is a pipe.
uInt statusChangeTime() const
Return the time when the file status was last changed in seconds since 00:00:00 GMT Jan 1,...
void removeSymLinks()
This function is used by RegularFile and Directory to remove all the links which,...
void getstat(void *buf) const
Get the lstat of this file.
uInt accessTime() const
Time related fucnctions: Return the time when the file was last accessed in seconds since 00:00:00 GM...
Bool isBlockSpecial() const
Check if the file is a block special file.
FileWriteStatus getWriteStatus() const
get write status of the file.
Bool isWritable() const
Check if the file is writable.
uInt readPermissions() const
Return the permissions as a decimal value.
Bool isSocket() const
Check if the file is a socket.
Bool isSymLink() const
Check if the file is a symbolic link.
void checkTarget(Path &targetName, Bool overwrite, Bool forDirectory=False) const
Check if the new path for a copy or move is valid.
virtual Int64 size() const
Return the size of the file.
uInt modifyTime() const
Return the time when the file was last modified in seconds since 00:00:00 GMT Jan 1,...
void setPermissions(uInt permissions)
Set permission with perm.
void touch(uInt time)
Update access time and modification time of a file.
Bool isReadable() const
Check if the file is readable.
void touch()
Update access time and modification time of a file.
File(const File &that)
Copy constructor (copy semantics).
Bool isCharacterSpecial() const
Check if the file is a character special file.
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...
static std::atomic< uInt > uniqueSeqnr_p
A sequence number to generate unique file names.
long groupID() const
Return the groupID of the file.
void getstat(const File &file, void *buf) const
Get the lstat of a file.
String statusChangeTimeString() const
return the time when the file status was last changed as a 26-characters String of the form: Thu Feb ...
Bool isDirectory(Bool followSymLink=True) const
Check if the file is a directory.
@ NOT_OVERWRITABLE
file exists but cannot be overwritten
@ OVERWRITABLE
file exists and can be overwritten
@ NOT_CREATABLE
file does not exist but cannot be created
@ CREATABLE
file does not exist and is creatable
int mylstat(const char *path, void *buf) const
Define a function for lstat.
const Path & path() const
Returns the pathname of the file.
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...
Bool exists() const
Check if the file exists.
long userID() const
Return the userID of the file.
Bool isRegular(Bool followSymLink=True) const
Check if the file is a regular file.
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...
Bool isExecutable() const
Check if the file is executable.
Path itsPath
Full pathname of the file.
static Path newUniqueName(const String &directory)
Create a new unique filename without a prefix.
File()
Construct a File object whose Path is set to the current working directory.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
TableExprNode time(const TableExprNode &node)
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.