« xDev Magazine Issue 1… | Home | MBS Xojo / Real Studi… »

Tip of day: Move file/folder to trash

For Mac OS X and Windows using MBS Plugin functions:
Shared Function MoveFileToTrash(f as FolderItem) As Boolean #if TargetMacOS then dim r as FolderItem dim e as integer = MacFileOperationMBS.MoveObjectToTrashSync(f, r, MacFileOperationMBS.kFSFileOperationDefaultOptions) if e = 0 then Return true // Ok end if #elseif TargetWin32 then dim w as new WindowsFileCopyMBS dim flags as integer = w.FileOperationAllowUndo + w.FileOperationNoErrorUI + w.FileOperationSilent + w.FileOperationNoConfirmation if w.FileOperationDelete(f, flags) then Return true // OK end if #else // Target not supported break Return false #endif End Sub
04 09 13 - 22:04
one comment

Yes, but this does not enable the ‘Putback’ feature in Mac OSX.
Any solution for this?
Jef (Email) - 04 09 13 - 22:49

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.