stormlibsharp icon indicating copy to clipboard operation
stormlibsharp copied to clipboard

Is overwrite supported?

Open zach-cloud opened this issue 5 years ago • 1 comments

I'm aware this project is old and probably not maintained anymore - but if anyone reads this, do you know how to make MPQ files overwrite? Right now, if you try to add a file that exists, it will just not add. And it seems that there's no delete function.

zach-cloud avatar Jul 11 '20 23:07 zach-cloud

If anyone else has the same question, I implemented like this:

    public void DeleteFile(string fileName)
    {
        VerifyHandle();

        if (!NativeMethods.SFileRemoveFile(_handle, fileName, 0))
            throw new Win32Exception();
    }

Not going to make a PR

zach-cloud avatar Jul 11 '20 23:07 zach-cloud