Skip to content

Add FileUtil.makeExecutable(Path) #542

@hohwille

Description

@hohwille

In several PRs we have already discussed about making a file executable (see resolved review comments):

To avoid copy&paste and other hacks, we should create a clean solution:

  • Add new method makeExecutable(Path) to FileAccess
  • Implement that in FileAccessImpl so that it behaves like chmod a+x on the given file.
  • If the given Path does not exist, the method should fail.
  • On Windows it should behave like chmod a+x «file» in git-bash (do nothing) but on all other OS it should add the executable flags (without modifying other file attributes).

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions