WordPress database error: [INSERT, UPDATE command denied to user '51213-2'@'10.10.20.57' for table 'wp_options']
INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_doing_cron', '1714811561.1646690368652343750000', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)


Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372
{"id":87,"date":"2011-08-18T17:10:21","date_gmt":"2011-08-18T16:10:21","guid":{"rendered":"http:\/\/www.jonathanantoine.com\/?p=87"},"modified":"2011-08-18T17:52:48","modified_gmt":"2011-08-18T16:52:48","slug":"faster-file-exists","status":"publish","type":"post","link":"http:\/\/www.jonathanantoine.com\/2011\/08\/18\/faster-file-exists\/","title":{"rendered":"Do you want a faster File.Exists \/ FileInfo.Exists \/ Directory.Exists ? I do !"},"content":{"rendered":"

Sometimes you need to check the existence of a file. Nothing is easier with the .Net framework which provide a property named Exists on FileInfo class. <\/p>\n

But it can be quite long, especially when the file is on a network drive.<\/strong> If so you’ll have to wait for a time-out to know that the file is not reachable.<\/p>\n

This was too slow for me so I coded this little utility which performs the same but with a customizable TimeOut. As it may interest you, here it is:
\n[csharp]private static bool VerifyFileExists(Uri uri, int timeout)
\n{
\n var task = new Task<bool>(() =>
\n {
\n var fi = new FileInfo(uri.LocalPath);
\n return fi.Exists;
\n });
\n task.Start();
\n return task.Wait(timeout) && task.Result;
\n}
\n[\/csharp]<\/p>\n

Enjoy !<\/p>\n","protected":false},"excerpt":{"rendered":"

Sometimes you need to check the existence of a file. Nothing is easier with the .Net framework which provide a property named Exists on FileInfo class. But it can be quite long, especially when the…<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[18,15],"_links":{"self":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/87"}],"collection":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":13,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":100,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/87\/revisions\/100"}],"wp:attachment":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}