Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

Operators

Contains operators to find and process files. This module is part of the Fake.IO.FileSystem package

Simple glob using as list

1: 
2: 
3: 
4: 
5: 
6: 
#r "paket: nuget Fake.IO.FileSystem //"
open Fake.IO.Globbing.Operators
let csProjectFiles = !! "src/*.csproj"

for projectFile in csProjectFiles do
    printf "F# ProjectFile: %s" projectFile

Combine globs

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
#r "paket: nuget Fake.IO.FileSystem //"
open Fake.IO.Globbing.Operators
let projectFiles =
    !! "src/*/*.*proj"
    ++ "src/*/*.target"
    -- "src/*/*.vbproj"

for projectFile in projectFiles do
    printf "ProjectFile: %s" projectFile

Forward globs to tasks

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
#r "paket:
nuget Fake.Core.Target
nuget Fake.IO.FileSystem //"
open Fake.Core
open Fake.IO
open Fake.IO.Globbing.Operators
Target.create "Clean" (fun _ ->
   !! "src/*/*/obj/**/*.nuspec"
   |> File.deleteAll
)
namespace Fake
namespace Fake.IO
namespace Fake.IO.Globbing
module Operators

from Fake.IO.Globbing
val csProjectFiles : Fake.IO.IGlobbingPattern
val projectFile : string
val printf : format:Printf.TextWriterFormat<'T> -> 'T
val projectFiles : Fake.IO.IGlobbingPattern
namespace Fake.Core
Multiple items
module Target

from Fake.Core

--------------------
type Target =
  { Name: string
    Dependencies: string list
    SoftDependencies: string list
    Description: TargetDescription option
    Function: TargetParameter -> unit }
    member DescriptionAsString : TargetDescription
val create : name:string -> body:(TargetParameter -> unit) -> unit
module File

from Fake.IO
val deleteAll : files:seq<string> -> unit

Functions and values

Function or valueDescription
( -- ) x pattern
Signature: x:IGlobbingPattern -> pattern:string -> IGlobbingPattern

Exclude operator

( !! )(x)
Signature: x:string -> IGlobbingPattern

Includes a single pattern and scans the files - !! x = AllFilesMatching x

( ++ ) x pattern
Signature: x:IGlobbingPattern -> pattern:string -> IGlobbingPattern

Add Include operator