You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be easy (or the default rather) to copy a globbing result to another directory. This is currently a bit painful (or I have not found the correct API):
let CopyWithRelativePath targetDir (files:IGlobbingPattern) =
let baseFull = (Path.GetFullPath files.BaseDirectory).TrimEnd [|'/';'\\'|]
for item in files do
let info = FileInfo.ofPath item
let itemSpec =
// first get relative path from the globbing
let relative = (info.FullName.Substring (baseFull.Length+1))
relative
let parent = Path.GetDirectoryName (targetDir</>itemSpec)
Directory.ensure parent
File.Copy(item, targetDir</>itemSpec, true)
!! "My*Glob*.exe"
|> GlobbingPattern.setBaseDir ("baseDir")
|> CopyWithRelativePath "targetDir"
Known Workaround
Copy code to build-script.
The text was updated successfully, but these errors were encountered:
Description
It should be easy (or the default rather) to copy a globbing result to another directory. This is currently a bit painful (or I have not found the correct API):
Known Workaround
Copy code to build-script.
The text was updated successfully, but these errors were encountered: