Skip to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What Apis can be used for deleting a file or a folder?

Featured Replies

What Apis can be used for deleting a file or a folder?
Can someone list most of them or all of them?

Some have already been included from @fearless

API/Library

Function/Method

Language/Framework

Notes

Windows API (Native)

DeleteFileA() / DeleteFileW()

C/C++

Low-level, Unicode support with W variant. Only deletes files, not directories.

Windows API (Native)

RemoveDirectoryA() / RemoveDirectoryW()

C/C++

Deletes empty directories only. Must be empty first.

Windows API (Native)

SHFileOperationA() / SHFileOperationW()

C/C++

High-level Shell API. Can delete files/folders recursively with flags like FO_DELETE. Supports recycle bin.

Windows API (Native)

IFileOperation COM Interface

C/C++

Modern replacement for SHFileOperation(). Better for recursive deletion and recycle bin support.

MSVC Standard Library

std::filesystem::remove()

C++17+

Deletes a single file or empty directory.

MSVC Standard Library

std::filesystem::remove_all()

C++17+

Recursively deletes files and directories.

Qt Framework

QFile::remove()

C++ (Qt)

Deletes a single file. Cross-platform.

Qt Framework

QDir::removeRecursively()

C++ (Qt)

Recursively removes a directory and all contents. Cross-platform.

Qt Framework

QDir::rmdir()

C++ (Qt)

Removes an empty directory only.

.NET Framework

File.Delete()

C# / VB.NET

Deletes a single file.

.NET Framework

Directory.Delete()

C# / VB.NET

Deletes a directory; optional recursive parameter for contents.

Python (stdlib)

os.remove()

Python

Deletes a single file.

Python (stdlib)

os.rmdir()

Python

Removes an empty directory.

Python (stdlib)

shutil.rmtree()

Python

Recursively removes a directory tree.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.