is_directory

Top  Previous  Next

Scripts > Class elements and c++ instructions > File handling > is_directory

 

Prototype

 

bool is_directory(const str& xsPath);

 

Description

 

Returns true, if the operating system reports the path represented by xsPath is a directory, else false.

 

Example:

 

if(is_directory(TargetName()))

  throw CTT_Error("not a correct target file");

 

 

Remark:

 

In contrast to the corresponding function in boost filesystem is_directory returns false for an empty string and does not produce an exception. Otherwise the above example would not run in the TETRA working space



This page belongs to the TextTransformer Documentation

Home  Content  German