<commit_before>(*** hide ***)
#I "../../bin"

(**
The FileSystem type provider
============================

This tutorial shows the use of the file system type provider.
*)

// reference the type provider dll
#r "FSharp.Management.dll"
open FSharp.Management

// Let the type provider do it's work
type Users = FileSystem<"C:\\Users\\">

// now you have typed access to your filesystem and you can browse it via Intellisense
Users.AllUsers.Path 
// [fsi:val it : string = "C:\Users\All Users"]

(**

![alt text](img/FileSystemProvider.png "Intellisense for the file system")

Relative paths
--------------

For web frameworks it's interesting to reference resources like images.
With the help of the FileSystemProvider we can reference relative paths via intellisense and get compile time safety.

![alt text](img/RelativeFileSystemProvider.png "Intellisense for the current subfolders")

*)


RelativePath.Img.``PowerShellProvider.png``
// [fsi:val it : string = "C:\Code\FSharp.Management\docs\content\img\PowerShellProvider.png"]<commit_msg>Improving docs<commit_after>(*** hide ***)
#I "../../bin"

(**
The FileSystem type provider
============================

This tutorial shows the use of the file system type provider.
*)

// reference the type provider dll
#r "FSharp.Management.dll"
open FSharp.Management

// Let the type provider do it's work
type Users = FileSystem<"C:\\Users\\">

// now you have typed access to your filesystem and you can browse it via Intellisense
Users.AllUsers.Path 
// [fsi:val it : string = "C:\Users\All Users"]

(**

![alt text](img/FileSystemProvider.png "Intellisense for the file system")

Relative paths
--------------

For web frameworks it's interesting to reference resources like images.
With the help of the FileSystemProvider we can browse the project via Intellisense and get compile time safety for relative paths.

![alt text](img/RelativeFileSystemProvider.png "Intellisense for the current subfolders")

*)

// reference the type provider dll
#r "FSharp.Management.dll"
open FSharp.Management

// browse the project
RelativePath.Img.``PowerShellProvider.png``
// [fsi:val it : string = "C:\Code\FSharp.Management\docs\content\img\PowerShellProvider.png"]
{'fraction_non_alphanumeric': 0.1456354590682949, 'fraction_numerical': 0.0, 'mean_word_length': 4.266666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '802540', 'n_tokens_mistral': 651, 'n_tokens_neox': 622, 'n_words': 231}