Answers for "Check Directory Exist"

C#
20

check directory exist node

const fs = require("fs"); // Or `import fs from "fs";` with ESM
if (fs.existsSync(path)) {
    // Do something
}
Posted by: Guest on May-22-2020
1

Check Directory Exist

//check directory exist
string directoryExistPath = @"C:UsersYogeshkumar HadiyaDesktopDirectoryHandling";
if (Directory.Exists(directoryExistPath))
{
    Console.WriteLine("Directory exist");
}
else
{
    Console.WriteLine("Directory not exist");
}
Posted by: Guest on December-13-2021
1

Check is directory exist shell

DIR="/etc/httpd/"
if [ -d "$DIR" ]; then
  # Take action if $DIR exists. #
  echo "Installing config files in ${DIR}..."
fi
Posted by: Guest on June-02-2021

Code answers related to "Check Directory Exist"

C# Answers by Framework

Browse Popular Code Answers by Language