Object of class WP_Filesystem_Direct could not be converted to string

In here:

$filesystem = new WP_Filesystem_Direct( false );

$server = getcwd();

$path = $server . '/wp-content/uploads/on_this_day.txt';

$filesystem->get_contents($path);

echo $filesystem;

…note that $filesystem, in the last line, is the same variable that’s holding your WP_Filesystem object. Try this instead:

$filesystem = new WP_Filesystem_Direct( false );

$server = getcwd();

$path = $server . '/wp-content/uploads/on_this_day.txt';

$file_content = $filesystem->get_contents($path);

echo $file_content;

techhipbettruvabetnorabahisbahis forumutaraftarium24edueduseduedusedueduseduedusedusedus