public static function FromFile( string $file, bool $checkIfFileExists = false )
   {

      if ( $checkIfFileExists && ! \file_exists( $file ) )
      {
         return false;
      }

      try
      {
         return DateTime::Parse( \filemtime( $file ) );
      }
      catch ( \Throwable $ex )
      {
         $ex = null;
         return false;
      }

   }
public static function FromFile( string $file, bool $checkIfFileExists = false )
   {

      if ( $checkIfFileExists && ! \file_exists( $file ) )
      {
         return false;
      }

      try
      {
         return DateTime::Parse( \filemtime( $file ) );
      }
      catch ( \Throwable $ex )
      {
         $ex = null;
         return false;
      }

   }
public static function FromFile ( string $ file , bool $ checkIfFileExists = false ) { if ( $ checkIfFileExists && ! \ file_exists ( $ file ) ) { return false ; } try { return DateTime :: Parse ( \ filemtime ( $ file ) ) ; } catch ( \ Throwable $ ex ) { $ ex = null ; return false ; } }
Gets the last change DateTime of defined file.

@param  string  $file              Get the last change time from this file.
@param  boolean $checkIfFileExists Check if the file exists, before getting the datetime. (default=FALSE)
@return \Beluga\Date\DateTime|bool Returns the DateTime, or boolean FALSE if does not exist or is not accessible by PHP.
Gets the last change DateTime of defined file .