<?xml version="1.0" encoding="UTF-8"?>
<!--

    BleachBit
    Copyright (C) 2008-2025 Andrew Ziem
    https://www.bleachbit.org

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    @app none
    @url none
    @os Windows, Linux, BSD
    @cleanerversion v1.1.0
    @cleanerdate 2019-04-23
    @cleanerby Andrew Ziem (2009-10-07 - 2019-04-19) & Tobias B. Besemer (2019-04-23)
    @tested ok v???, Windows 7
    @testeddate 2019-03-10
    @testedby https://github.com/Tobias-B-Besemer
    @note 

-->
<cleaner id="deepscan">
  <label translate="true">Deep scan</label>
  <description>Clean files widely scattered across the disk</description>
  <option id="backup">
    <label>Backup files</label>
    <description>Delete the backup files</description>
    <warning>Inspect the preview for any files you want to keep.</warning>
    <action command="delete" search="deep" regex="\.[Bb][Aa][Kk]$"/>
    <action command="delete" search="deep" regex="[a-zA-Z]{1,4}~$"/>
  </option>
  <option id="ds_store">
    <label translate="false">.DS_Store</label>
    <description>Delete the files</description>
    <warning>This option is slow.</warning>
    <action command="delete" search="deep" regex="^\.DS_Store$"/>
  </option>
  <option id="thumbs_db">
    <label translate="false">Thumbs.db</label>
    <description>Delete the files</description>
    <warning>This option is slow.</warning>
    <action command="delete" search="deep" regex="^Thumbs\.db$"/>
    <action command="delete" search="deep" regex="^Thumbs\.db:encryptable$"/>
  </option>
  <option id="tmp">
    <label>Temporary files</label>
    <description>Delete the temporary files</description>
    <warning>This option is slow.</warning>
    <!-- http://support.microsoft.com/kb/211632 -->
    <action command="delete" search="deep" regex="^~wr[a-z][0-9]{4}\.tmp$"/>
    <!-- http://support.microsoft.com/kb/826810 -->
    <action command="delete" search="deep" regex="^ppt[0-9]{4}\.tmp$"/>
  </option>
  <option id="vim_swap_user">
    <label>VIM swap files under user profile</label>
    <description>Delete the backup files</description>
    <warning>This option is slow.</warning>
    <!--
Here is an example. When editing foo.txt, VIM makes a file called .foo.txt.swp
that starts with a period.

If the .swp file exists, it will cycle through the alphabet according to
this post
https://groups.google.com/forum/#!msg/vim_use/JBHSs3kPPJU/X9WeMsZcfWAJ

The likeliness of VIM not being able to create a swap on the first three
times is small.

Be careful not to match files such as ~/.htpasswd
https://github.com/bleachbit/bleachbit/issues/683

-->
    <action command="delete" search="deep" regex="^.*\.sw[nop]$"/>
  </option>
  <option id="vim_swap_root">
    <label>VIM swap files across system</label>
    <description>Delete the backup files</description>
    <warning>This option is slow.</warning>
    <action command="delete" search="deep" regex="^.*\.sw[nop]$" path="/" os="linux"/>
  </option>
</cleaner>
