Skip to content

Draft: core: Refactor SystemPath and use their functions in the codebase instead of system commands

Add Functions to SystemPath

  • Add more functions to src/core/model/system-path.cc, including:
    • RemoveDirectories()
    • RemoveFile()
    • GetFileSize()
  • Use those functions instead of directly invoking the Linux commands. This change makes the code more portable and robust.

SystemPath Refactor (Experimental)

  • Refactor and simplify the implementation of the functions in SystemPath
  • Replace system-path.{h,cc} with ns3-filesystem.h, which is a wrapper to the conditional compilation snippet used to decide which library to include: filesystem or experimental/filesystem.
  • Use the filesystem library directly on the code, using the ns3-filesystem.h header file.
  • Fix issue #781

NOTE: The animation-interface test is currently failing in this MR, due to issue #781.

Edited by Eduardo Almeida

Merge request reports