sindresorhus
recycle-bin

https://github.com/sindresorhus/recycle-bin
Go to Github

Move files and folders to the Windows recycle bin

https://github.com/sindresorhus/recycle-bin/issues/1Go to Github

FundedView inUse the newer IFileOperation interface#1

sindresorhuscreated this issue 13 days ago

From the SHFileOperation docs:

This function has been replaced in Windows Vista by IFileOperation.

##

I wanted to use IFileOperation initially, but couldn't find any good examples of using it in C. Most used it in C++.

Should use the IFileOperation::DeleteItems and IFileOperation::SetOperationFlags(FOFX_ADDUNDORECORD | FOFX_RECYCLEONDELETE | FOF_NOERRORUI | FOF_SILENT | FOFX_EARLYFAILURE) methods.

##

Switching to then newer API might add support for long paths, not really sure. See: https://github.com/sindresorhus/trash/issues/16.

##

We can still keep the SHFileOperation around for support for Vista and older, as the FOFX_RECYCLEONDELETE flag requires Windows 8.

##

Help wanted - My C skills are very much at a noobish level, so any help would be much appriciated :)

Happy to use C++ if that's what it takes. I'm just trying to keep it simple with C.

Logs

Amount funded

$100.00

Resolve this issue and earn $90.00

Fund this issue

Fund as

Payment method

Amount(USD)

Please sign in first to fund this issue

Sign in with

Pull requests

0

    Submit

    URL of your pull request

    Submit your pull request

    Please sign in first to submit a pull request

    Sign in with