powershell remove folder if exists code example
Example 1: python check if folder is empty
if not os.listdir('/home/varun/temp') :
print("Directory /home/varun/temp is empty")
Example 2: php check if file exists
if (!file_exists('http://mysite.com/images/thumbnail_1286954822.jpg')) {
$filefound = '0';
}
Example 3: java check if file exists
import java.io.File;
File tmpDir = new File("/var/tmp");
boolean exists = tmpDir.exists();