premake / premake/premake-core

Please add os.copydir

Open
#2,035 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

What problem will this solve?
An easy way to copy whole directories from a premake script. Typically called as part of a post-build step.
(The actual problem I have right now is os.copyfile is failing because one of the "files" I'm copying is, in fact, a directory.)

What might be a solution?
An addition to the os API, a copydir function that (optionally) recursively copies the contents of a directory.

What other alternatives have you already considered?
I'm just about to write my own function to do this because it's something I need right now. But it'd be nice if such a function existed in the future.

Anything else we should know?
Nope. :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing os.copyfile API and the surrounding os API entry points. Define how copydir handles directories, optional recursion, and the existing post-build use case; done means the API can copy a directory as requested without treating it as a file.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.