bicep icon indicating copy to clipboard operation
bicep copied to clipboard

Add loadDirectoryFileInformation function

Open GABRIELNGBTUC opened this issue 5 months ago • 1 comments
trafficstars

Description

Fixes #3607

Add loadDirectoryFileInformation function to retrieve basic information about a directory's content

Checklist

Microsoft Reviewers: Open in CodeFlow

GABRIELNGBTUC avatar May 30 '25 07:05 GABRIELNGBTUC

Any news on this one? Really important PR and new function.

guimatheus92 avatar Jun 18 '25 21:06 guimatheus92

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 9.37%. Comparing base (108d816) to head (a360dbd). :warning: Report is 2946 commits behind head on main.

:exclamation: There is a different number of reports uploaded between BASE (108d816) and HEAD (a360dbd). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (108d816) HEAD (a360dbd)
dotnet 4 0
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #17241       +/-   ##
===========================================
- Coverage   94.28%    9.37%   -84.91%     
===========================================
  Files        1113        7     -1106     
  Lines      100791      288   -100503     
  Branches     8734      123     -8611     
===========================================
- Hits        95028       27    -95001     
+ Misses       4595      261     -4334     
+ Partials     1168        0     -1168     
Flag Coverage Δ
dotnet ?
typescript 9.37% <ø> (+1.66%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more. see 1103 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Jul 03 '25 13:07 codecov-commenter

Sorry about the delay reviewing! I've left some comments.

anthony-c-martin avatar Jul 03 '25 14:07 anthony-c-martin

Test this change out locally with the following install scripts (Action run 16993909457)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 16993909457
    
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 16993909457"
    
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 16993909457
    
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 16993909457"
    

github-actions[bot] avatar Aug 15 '25 16:08 github-actions[bot]

Content PR - https://github.com/MicrosoftDocs/azure-docs-pr/pull/305500

mumian avatar Sep 12 '25 16:09 mumian

@anthony-c-martin I don't know if there is documentation for this already, but I am confused about this function. What are the use cases for this?

I am asking this, because I wonder if this new function can be used in DeploymentScripts, to upload more than on script? Which could solve #17513?

Thanks

guimatheus92 avatar Sep 27 '25 16:09 guimatheus92

@anthony-c-martin I don't know if there is documentation for this already, but I am confused about this function. What are the use cases for this?

I am asking this, because I wonder if this new function can be used in DeploymentScripts, to upload more than on script? Which could solve #17513?

Thanks

This function is executed locally when Bicep creates the .json file, so there's unfortunately no ability to influnce the behavior of deploymentScripts with it.

anthony-c-martin avatar Sep 29 '25 13:09 anthony-c-martin

@anthony-c-martin what are the use cases for this? doesn't seem like it's possible to use the resulting array to e.g. import all files in a folder, or loadJsonContent() from all files in a folder or anything similar to that -- it only exposes file names/paths literally without there being an obvious use case to consume them?

stbeldarborge avatar Oct 01 '25 10:10 stbeldarborge

@anthony-c-martin what are the use cases for this? doesn't seem like it's possible to use the resulting array to e.g. import all files in a folder, or loadJsonContent() from all files in a folder or anything similar to that -- it only exposes file names/paths literally without there being an obvious use case to consume them?

Yeah, I understand we cannot use in DeploymentScripts, but still didn't understand the use cases for this new function.

guimatheus92 avatar Oct 01 '25 12:10 guimatheus92