Exploring the Deno namespace
All the functionality that is not covered by a Web API lives under the Deno namespace. This is functionality that is exclusive to Deno and that can't, for instance, be bundled to run in Node or the browser.
In this section, we'll explore some of this functionality. We'll be building small utilities, mimicking some of the programs you use daily.
If you want to explore the available functions before we get our hands dirty, they are available at https://doc.deno.land/builtin/stable.
Building a simple ls command
If you've ever used a *nix system's Terminal or Windows PowerShell, you are probably familiar with the ls
command. Briefly, it lists the files and folders inside a directory. What we will do is create a Deno utility that mimics some functionality of ls
, that is, lists the files in a directory, and shows some details about them.
The original command has a countless number of flags, which we will not implement here...