NUbots / NUbots/NUbots

Fileutil should use the `std::filesystem` API

Open
#484 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

-Enhancement -Help-Wanted D-Good-First-Issue G-DevOps-QA L-C++
Dominant language
C++
Stars
41
Forks
22
Avg merge
1h 48m
Merged PRs (30d)
1

Description

Fileutil should be done using the std::filesystem api.
We don't need listFiles or listDir anymore since std::filesystem does that for us.

Basically, do the following:

  1. Remove those methods
  2. Replace the use of strings with std::filesystem::path for file paths
  3. Use other nice things from std::filesystem where applicable

Look at FileWatcher.cpp for a reference on how to use std::filesystem and what it can be used for

Contributor guide

No contributing guide indexed for this repository

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

Locate Fileutil and inspect FileWatcher.cpp for the repository's std::filesystem usage. Remove listFiles and listDir, migrate file paths from strings to std::filesystem::path, and identify other applicable filesystem APIs. Done means Fileutil no longer depends on those methods or string paths and uses std::filesystem consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.