mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
* enh(ProcessRunner): does not detect launch errors #4482 * enh(File): add absolutePath and existsAnywhere() #4482 * fix windows build and tsan fail * fix tsan * fix windows file tests * comment out some CI env path -related issues * fix tsan and windows build * try to fix ci * ignore ProcessRunner test fail on windows cmake * enh(File): canExecute throws FileNotFoundException if the file to be executed can't be found in the path. * Few C++ modernisation changes. * enh(File): Windows specifics of File::canExecute. Returns false if the file to be executed can't be found using absolutePath. --------- Co-authored-by: Matej Kenda <matejken@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f24547cdcf
commit
3656f069e1
@@ -54,7 +54,7 @@ class Foundation_API File: private FileImpl
|
||||
/// use the forward slash ("/") as directory separator.
|
||||
{
|
||||
public:
|
||||
typedef FileSizeImpl FileSize;
|
||||
using FileSize = FileSizeImpl;
|
||||
|
||||
enum LinkType
|
||||
/// Type of link for linkTo().
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
File(const File& file);
|
||||
/// Copy constructor.
|
||||
|
||||
virtual ~File();
|
||||
~File() override;
|
||||
/// Destroys the file.
|
||||
|
||||
File& operator = (const File& file);
|
||||
@@ -105,9 +105,24 @@ public:
|
||||
const std::string& path() const;
|
||||
/// Returns the path.
|
||||
|
||||
std::string absolutePath() const;
|
||||
/// Returns absolute path.
|
||||
/// Attempts to find the existing file
|
||||
/// using curent work directory and the PATH
|
||||
/// environment variable.
|
||||
/// If the file doesn't exist, returns empty string.
|
||||
|
||||
bool exists() const;
|
||||
/// Returns true iff the file exists.
|
||||
|
||||
bool existsAnywhere() const;
|
||||
/// If the file path is relative, searches
|
||||
/// for the file in the current working directory
|
||||
/// and the environment paths.
|
||||
/// If the file path is absolute, the
|
||||
/// functionality is identical to the
|
||||
/// exists() call.
|
||||
|
||||
bool canRead() const;
|
||||
/// Returns true iff the file is readable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user