Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of !! operator in F# (.fsx) [duplicate]

Tags:

f#

f#-fake

I'm looking at a FAKE build script that was auto-generated through an FsLab template. In front of one of the strings in a "let" binding, the !! operator is used. What is the meaning of the !! operator?

Looking on the Microsoft Docs F# Symbols and Operator Reference, the !! operator is not listed.

Here is the code in question, the !! operator is in the third-to-last line:

#r "./packages/build/FAKE/tools/FakeLib.dll"

open Fake
open System

let buildDir  = "./build/"
let appReferences = !! "/**/*.fsproj"
let dotnetcliVersion = "2.0.2"
let mutable dotnetExePath = "dotnet"

Further down, the appReferences identifier is used as following:

Target "Restore" (fun _ ->
    appReferences
    |> Seq.iter (fun p ->
        let dir = System.IO.Path.GetDirectoryName p
        runDotnet dir "restore"
    )
)
like image 540
John Henderson Avatar asked Dec 08 '25 17:12

John Henderson


1 Answers

It takes file pattern and returns a collection of files matching the pattern.

like image 60
Javier Lim Avatar answered Dec 11 '25 09:12

Javier Lim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!