protected static function checkFileWritableJob(string $path, bool $truncate = false): bool
    {
        if (\file_exists($path) && (!\is_file($path) || !\is_writable($path))) {
            return false;
        }
        
        if ($truncate && \is_file($path)) {
            @\ftruncate(@\fopen($path, 'wb'), 0);
        }
        
        return true;
    }
protected static function checkFileWritableJob(string $path, bool $truncate = false): bool
    {
        if (\file_exists($path) && (!\is_file($path) || !\is_writable($path))) {
            return false;
        }
        
        if ($truncate && \is_file($path)) {
            @\ftruncate(@\fopen($path, 'wb'), 0);
        }
        
        return true;
    }
protected static function checkFileWritableJob ( string $ path , bool $ truncate = false ) : bool { if ( \ file_exists ( $ path ) && ( ! \ is_file ( $ path ) || ! \ is_writable ( $ path ) ) ) { return false ; } if ( $ truncate && \ is_file ( $ path ) ) { @ \ ftruncate ( @ \ fopen ( $ path , 'wb' ) , 0 ) ; } return true ; }
Check if the given path is a regular file that is writable.
Check if the given path is a regular file that is writable .