MCPcopy Create free account
hub / github.com/apache/arrow / DeleteDirEntry

Function DeleteDirEntry

cpp/src/arrow/util/io_util.cc:831–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831Status DeleteDirEntry(const PlatformFilename& path, const WIN32_FIND_DATAW& entry) {
832 if ((entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) {
833 return DeleteDirEntryDir(path, entry);
834 }
835 // It's a non-directory entry, most likely a regular file
836 if (!DeleteFileW(path.ToNative().c_str())) {
837 return IOErrorFromWinError(GetLastError(), "Cannot delete file '", path.ToString(),
838 "': ");
839 }
840 return Status::OK();
841}
842
843Status DeleteDirTreeInternal(const PlatformFilename& dir_path) {
844 ARROW_ASSIGN_OR_RAISE(auto entries, ListDirInternal(dir_path));

Callers 1

DeleteDirTreeInternalFunction · 0.85

Calls 5

DeleteDirEntryDirFunction · 0.85
IOErrorFromWinErrorFunction · 0.85
IOErrorFromErrnoFunction · 0.85
OKFunction · 0.50
ToStringMethod · 0.45

Tested by

no test coverage detected