Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0-preview6] UnixFileMode backport #71199

Merged

Commits on Jun 23, 2022

  1. Implement UnixFileMode APIs (dotnet#69980)

    * Implement UnixFileMode APIs on Unix.
    
    * Throw PNSE on Windows, add UnsupportedOSPlatform.
    
    * Fix API compat issue.
    
    * Borrow a few things from SafeFileHandle API PR to this compiles.
    
    * Fix System.IO.FileSystem.AccessControl compilation.
    
    * Add xml docs.
    
    * Replace Interop.Sys.Permissions to System.IO.UnixFileMode.
    
    * Throw PNSE immediately on Windows.
    
    * Add ODE to xml docs of methods that accept a handle.
    
    * Don't throw (PNSE) from FileSystemInfo.UnixFileMode getter on Windows.
    
    * Minor style fix.
    
    * Get rid of some casts.
    
    Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
    
    * Add tests for creating a file/directory with UnixFileMode.
    
    * Some CI envs don't have a umask exe, try retrieving via a shell builtin.
    
    * Update expected test mode values.
    
    * Fix OSX
    
    * Fix Windows build.
    
    * Add ArgumentException tests.
    
    * Fix Windows build.
    
    * Add get/set tests.
    
    * Update test for Windows.
    
    * Make setters target link instead of link target.
    
    * Linux: fix SetUnixFileMode
    
    * Fix OSX compilation.
    
    * Try make all tests pass in CI.
    
    * For link, operate on target permissions.
    
    * Skip tests on Browser.
    
    * Add tests for 'Get' that doesn't use a 'Set' first.
    
    * Don't perform exist check for handles.
    
    * Fix Get test for wasm.
    
    * Review xml comments.
    
    * Add comment to test.
    
    * GetUnixFileMode for handle won't throw UnauthorizedAccessException.
    
    * Apply suggestions from code review
    
    Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
    
    * PR feedback.
    
    * Update enum doc to say 'owner' instead of 'user'.
    
    * Use UnixFileMode in library.
    
    * Use UnixFileMode in library tests.
    
    * Fix Windows build.
    
    * Fix missing FileAccess when changing to FileStreamOptions API.
    
    * PR feedback.
    
    * Fix Argument_InvalidUnixCreateMode message.
    
    Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
    
    Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
    Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
    3 people committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    cfef292 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3cccc4f View commit details
    Browse the repository at this point in the history