Skip to content

Add FileAttributes.Executable as a possible FileAttribute #925

@kblok

Description

@kblok

Introduction

With File.SetAttributes we can modify some file permissions, such as ReadOnly or ReadWrite, but we can't set Executable (a.k.a. 7) permission. I think we have everything we need on FileStatus.Unix.cs so we can do something like:

File.SetAttributes(path, FileAttributes.Executable);

It should call chmod setting a 7.

Usage

Some possible usage is when you need to download a zip file. You know that you have an app inside, but you need to change the mode to 7 to be able to execute it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.IOos-linuxLinux OS (any supported distro)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions