How to resolve the algorithm Check that file exists step by step in the Nemerle programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Check that file exists step by step in the Nemerle programming language

Table of Contents

Problem Statement

Verify that a file called     input.txt     and   a directory called     docs     exist.

This should be done twice:

Optional criteria (May 2015):   verify it works with:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Check that file exists step by step in the Nemerle programming language

Source code in the nemerle programming language

using System.Console;
using System.IO;
 
WriteLine(File.Exists("input.txt"));
WriteLine(File.Exists("/input.txt"));
WriteLine(Directory.Exists("docs"));
WriteLine(Directory.Exists("/docs"));


  

You may also check:How to resolve the algorithm File input/output step by step in the Snabel programming language
You may also check:How to resolve the algorithm User input/Graphical step by step in the REXX programming language
You may also check:How to resolve the algorithm Random number generator (device) step by step in the XPL0 programming language
You may also check:How to resolve the algorithm Integer sequence step by step in the Tcl programming language
You may also check:How to resolve the algorithm Non-continuous subsequences step by step in the Kotlin programming language