Skip to content

Use of system() function for file operations #17

@temple-fed

Description

@temple-fed

Many times throughout etcpack.ccx when a temp file is created and then subsequently removed, or during some sort of file copy operation, instead of calling remove() for example, system("del filename") or system("copy filename destination") is used.
Albeit a somewhat lazy solution, the main issue is that it raises concerns regarding performance and platform availability.
I think it would be worth taking a look at the file IO as we can always benefit from faster (maybe a bit prettier) code.
Case in point being the fileExists function, which could just use the stat function instead of opening and closing the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions