file_size

Top  Previous  Next

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

 

Prototype

 

unsigned int file_size(const str& xsPath);

 

Description

 

Returns the size of the file in bytes as reported by the operating system. An exception is thrown, if the path does not exist or, if the path is a directory.

 

Example:

 

if(exists(SourceName()) && file_size(SourceName()) == 0)

   throw CTT_Error("source file is empty");

 



This page belongs to the TextTransformer Documentation

Home  Content  German