[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "# Original source: https://github.com/AndroidIDEOfficial/AndroidIDE/blob/main/.github/ISSUE_TEMPLATE/BUG.yml\nname: Bug Report\ndescription: File a bug report\ntitle: \"[Bug]: \"\nlabels: [\"bug\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report! Please provide a proper title and clear description to this issue.\n        \n  - type: textarea\n    id: what-happened\n    attributes:\n      label: What happened?\n      description: Describe the issue properly.\n      placeholder: Describe the error\n    validations:\n      required: true\n  - type: textarea\n    id: expected-behavior\n    attributes:\n      label: What's the expected behavior?\n      description: Tell us what is the expected behavior.\n      placeholder: Describe the expected behavior.\n    validations:\n      required: true\n  - type: dropdown\n    id: version\n    attributes:\n      label: What version of File Explorer you are using?\n      multiple: false\n      options:\n        - latest GitHub action\n        - latest release (v1.1.0)\n        - from IzzyOnDroid\n    validations:\n      required: true\n  - type: textarea\n    id: logs\n    attributes:\n      label: Relevant log output\n      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.\n      render: shell\n  - type: checkboxes\n    id: not-a-duplicate\n    attributes:\n      label: Duplicate issues\n      description: Please make sure that there are no similar issues opened. Duplicate issues will be closed directly. If there are any similar looking issues, leave a comment there.\n      options:\n        - label: This issue has not been reported yet.\n          required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Feature Request\ndescription: Requesting a new feature\ntitle: \"[Feature]: \"\nlabels: [\"feature request\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this feature request! Please provide a proper title and clear description to this feature. You must request one feature at a time, if you want to request multiple features, create a new request for each one.\n        \n  - type: textarea\n    id: feature-details\n    attributes:\n      label: Feature Description\n      description: Describe the feature properly.\n      placeholder: Describe the feature\n    validations:\n      required: true\n\n  - type: textarea\n    id: implementation\n    attributes:\n      label: How can this feature be implemented?\n      description: Tell us any idea on how can we implement this feature\n      placeholder: Describe the possible implementation\n    validations:\n      required: false\n\n  - type: checkboxes\n    id: not-a-duplicate\n    attributes:\n      label: Duplicate feature\n      description: Please make sure that there are no similar feature opened. Duplicate feature will be closed directly. If there are any similar looking features, leave a comment there.\n      options:\n        - label: This feature has not been requested yet.\n          required: true\n"
  },
  {
    "path": ".github/workflows/DeleteWorkflowRuns.yml",
    "content": "# Original at https://github.com/Sketchware-Pro/Sketchware-Pro/blob/main/.github/workflows/DeleteWorkflowRuns.yml\n\nname: 'Delete old workflow runs'\non:\n  workflow_dispatch:\n    inputs:\n      days:\n        description: 'Number of retains days.'\n        required: true\n        default: '20'\n\n      minimum_runs:\n        description: 'The minimum runs to keep for each workflow.'\n        required: true\n        default: '6'\n\njobs:\n  deleteWorkflowRuns:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Delete workflow runs\n        uses: Mattraks/delete-workflow-runs@v2.0.3\n        with:\n          token: ${{ github.token }}\n          repository: ${{ github.repository }}\n          retain_days: ${{ github.event.inputs.days }}\n          keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}\n"
  },
  {
    "path": ".github/workflows/android.yml",
    "content": "# Original at https://github.com/Sketchware-Pro/Sketchware-Pro/blob/main/.github/workflows/android.yml\n\nname: Android CI\n\non:\n  push:\n    paths:\n      - '.github/workflows/android.yml'\n      - 'app/**'\n      - 'build-logic/**'\n      - 'kotlinc/**'\n      - 'gradle/**'\n      - 'build.gradle'\n      - 'gradle.properties'\n      - 'gradlew'\n      - 'gradlew.bat'\n      - 'public-stable-ids.txt'\n      - 'settings.gradle'\n  pull_request:\n    paths:\n      - '.github/workflows/android.yml'\n      - 'app/**'\n      - 'build-logic/**'\n      - 'kotlinc/**'\n      - 'gradle/**'\n      - 'build.gradle'\n      - 'gradle.properties'\n      - 'gradlew'\n      - 'gradlew.bat'\n      - 'public-stable-ids.txt'\n      - 'settings.gradle'\n  workflow_dispatch:\n\njobs:\n  build:\n    name: Build release APK\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n\n      - name: Set up JDK 18\n        uses: actions/setup-java@v3\n        with:\n          java-version: 18\n          distribution: temurin\n          cache: gradle\n\n      - name: Grant execute permissions for gradlew\n        run: chmod +x gradlew\n\n      - name: Build release apk\n        uses: gradle/gradle-build-action@v2\n        with:\n          arguments: assembleRelease\n\n      - name: Upload APK\n        uses: actions/upload-artifact@v3\n        with:\n          name: apk-release\n          path: app/build/outputs/apk/release\n\n"
  },
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n.cxx\nlocal.properties\n"
  },
  {
    "path": ".idea/.gitignore",
    "content": "# Default ignored files\n/shelf/\n/workspace.xml\n"
  },
  {
    "path": ".idea/.name",
    "content": "File Explorer"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </JetCodeStyleSettings>\n    <codeStyleSettings language=\"XML\">\n      <option name=\"FORCE_REARRANGE_MODE\" value=\"1\" />\n      <indentOptions>\n        <option name=\"CONTINUATION_INDENT_SIZE\" value=\"4\" />\n      </indentOptions>\n      <arrangement>\n        <rules>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>xmlns:android</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>xmlns:.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*:id</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*:name</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>name</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>style</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>^$</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>ANDROID_ATTRIBUTE_ORDER</order>\n            </rule>\n          </section>\n          <section>\n            <rule>\n              <match>\n                <AND>\n                  <NAME>.*</NAME>\n                  <XML_ATTRIBUTE />\n                  <XML_NAMESPACE>.*</XML_NAMESPACE>\n                </AND>\n              </match>\n              <order>BY_NAME</order>\n            </rule>\n          </section>\n        </rules>\n      </arrangement>\n    </codeStyleSettings>\n    <codeStyleSettings language=\"kotlin\">\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": ".idea/codeStyles/codeStyleConfig.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </state>\n</component>"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <bytecodeTargetLevel target=\"18\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/deploymentTargetDropDown.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"deploymentTargetDropDown\">\n    <targetSelectedWithDropDown>\n      <Target>\n        <type value=\"QUICK_BOOT_TARGET\" />\n        <deviceKey>\n          <Key>\n            <type value=\"VIRTUAL_DEVICE_PATH\" />\n            <value value=\"C:\\Users\\pavnv\\.android\\avd\\Pixel_4_API_30.avd\" />\n          </Key>\n        </deviceKey>\n      </Target>\n    </targetSelectedWithDropDown>\n    <timeTargetWasSelectedWithDropDown value=\"2022-07-30T18:01:47.187574800Z\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleMigrationSettings\" migrationVersion=\"1\" />\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"testRunner\" value=\"GRADLE\" />\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"gradleJvm\" value=\"openjdk-18\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n          </set>\n        </option>\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"DesignSurface\">\n    <option name=\"filePathToZoomLevelMap\">\n      <map>\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable-v24/ic_launcher_foreground.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/bg_toast_normal.xml\" value=\"0.26205128205128203\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/bg_toast_warning.xml\" value=\"0.26205128205128203\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/fastscroll_thumb.xml\" value=\"0.26205128205128203\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_baseline_assignment_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_baseline_chevron_right_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_baseline_more_vert_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_launcher_background.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_round_menu_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_round_redo_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/drawable/ic_round_undo_24.xml\" value=\"0.26614583333333336\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/activity_main.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_bottom_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_bottom_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_options_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_options_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_tasks_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/common_tasks_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/custom_toast.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/dialog_container.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/empty_folder_placeholder.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/file_info_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/file_info_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/input.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/normal_tab_fragment_file_item.xml\" value=\"0.20833333333333334\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/normal_tab_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/path_tree_view.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/progress_view.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/q_dialog_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/search_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/tab_fragment_container.xml\" value=\"0.18796296296296297\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/layout/text_editor_activity_layout.xml\" value=\"0.24615384615384617\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/menu/text_editor_menu.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/Android_Projects/Quicktools/app/src/main/res/xml/provider_paths.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/android_projects/Quicktools/app/src/main/res/layout/activity_main.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/Desktop/android_projects/Quicktools/app/src/main/res/layout/checklist_activity_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ai_file_extension.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/android_file_extension.xml\" value=\"0.1395\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/apk_file_extension.xml\" value=\"0.1395\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/app_icon_foreground.xml\" value=\"0.13\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/bg_toast_normal.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/bg_toast_warning.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/code_file_extension.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/css_file_extension.xml\" value=\"0.1395\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/fastscroll_thumb.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/font_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_add_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_android_24.xml\" value=\"0.124\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_assignment_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_bookmark_add_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_bookmark_remove_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_bug_report_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_chevron_right_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_delete_sweep_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_extension_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_file_copy_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_folder_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_folder_open_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_info_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_layers_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_logout_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_more_vert_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_open_in_browser_24.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_open_in_new_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_pan_tool_alt_24.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_restart_alt_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_rev_sort_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_save_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_select_all_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_baseline_sort_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_launcher_foreground.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_code_24.xml\" value=\"0.1115\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_compress_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_content_cut_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_delete_forever_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_edit_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_edit_note_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_exit_to_app_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_folder_open_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_home_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_insert_drive_file_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_key_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_manage_search_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_menu_24.xml\" value=\"0.1115\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_play_arrow_24.xml\" value=\"0.1115\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_redo_24.xml\" value=\"0.1115\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_search_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_settings_24.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_share_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_tab_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_timelapse_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ic_round_undo_24.xml\" value=\"0.122\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/jpg_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/mp4_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/php_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/powerpoint_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/ppt_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/txt_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/unknown_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/video_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/drawable/zip_file_extension.xml\" value=\"0.1045\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/activity_main.xml\" value=\"0.18333333333333332\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/activity_main_drawer.xml\" value=\"0.1872103799814643\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/activity_main_drawer_bookmark_item.xml\" value=\"0.20512820512820512\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/apps_tab_app_item.xml\" value=\"0.20512820512820512\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/apps_tab_fragment.xml\" value=\"0.20512820512820512\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/bottom_bar_menu_item.xml\" value=\"0.24895833333333334\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/checklist_activity_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/checklist_tab_fragment.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_custom_dialog.xml\" value=\"0.18703703703703703\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_options_dialog.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_options_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_options_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_tasks_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/common_tasks_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/custom_toast.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/dialog_container.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/empty_folder_placeholder.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_file_item.xml\" value=\"0.20253164556962025\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_fragment.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_fragment_file_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_info_dialog.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_info_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_path_root_view.xml\" value=\"0.18703703703703703\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_placeholder.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_task_dialog.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_explorer_tab_task_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_info_dialog_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/file_info_dialog_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/input.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/normal_tab_fragment_file_item.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/normal_tab_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/path_tree_view.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/progress_view.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/q_dialog_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/search_fragment.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/search_fragment_layout.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/settings_activity.xml\" value=\"0.20512820512820512\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/text_editor_activity.xml\" value=\"0.10989583333333333\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/text_editor_activity_layout.xml\" value=\"0.1638888888888889\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/layout/text_editor_completion_item.xml\" value=\"0.18703703703703703\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/menu/main_menu.xml\" value=\"0.20512820512820512\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/menu/main_more_options_menu.xml\" value=\"0.25\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/menu/tab_menu.xml\" value=\"0.1\" />\n        <entry key=\"..\\:/Users/pavnv/OneDrive/Desktop/android_studio_projects/Quicktools/app/src/main/res/menu/text_editor_menu.xml\" value=\"0.25\" />\n      </map>\n    </option>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_X\" project-jdk-name=\"Android Studio default JDK\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": ".replit",
    "content": "language = \"bash\"\nrun = \"\""
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "![CI](https://github.com/Raival-e/File-Explorer/actions/workflows/android.yml/badge.svg)\n[![License](https://img.shields.io/github/license/Raival-e/File-Explorer)](https://github.com/Raival-e/File-Explorer/blob/master/LICENSE)\n![Commit Activity](https://img.shields.io/github/commit-activity/m/Raival-e/File-Explorer)\n[![Total downloads](https://img.shields.io/github/downloads/Raival-e/File-Explorer/total)](https://github.com/Raival-e/File-Explorer/releases)\n![Repository Size](https://img.shields.io/github/repo-size/Raival-e/File-Explorer)\n\n> [!WARNING]  \n> This project is no longer maintained. Check out the new version [here](https://github.com/Raival-e/File-Explorer-Compose).\n\n# File Explorer\n\nA full-featured and lightweight file manager with Material 3 Dynamic colors\n\n# Screenshots\n\n<div style=\"overflow: hidden\">\n<img src=\"/assets/screenshot1.png\" width=\"32%\" /> <img src=\"/assets/screenshot2.png\" width=\"32%\" /> <img src=\"/assets/screenshot3.png\" width=\"32%\" />\n</div>\n\n# Features\n\n- Open source and simple.\n- All basic file management functionality (e.g. copy, paste,.. etc) are supported.\n- Support for multiple tabs, and Tasks which make managing files much easier.\n- Powerful Code Editor ([Sora Editor](https://github.com/Rosemoe/sora-editor)).\n- Deep search that allows you to search in files contents.\n\n# Upcoming features\n- [ ] Built-in audio/video player and PDF/image viewer\n- [ ] Archive viewer\n- [ ] Support for exploring root/external storage\n\n# Download\n\n[<img alt=\"Get it on IzzyOnDroid\" height=\"80\" src=\"https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png\">](https://apt.izzysoft.de/fdroid/index/apk/com.raival.fileexplorer)\n\n- Latest release from [here](https://github.com/Raival-e/File-Explorer/releases/tag/v1.1.0).\n- Latest debug build from [Github Actions](https://github.com/Raival-e/File-Explorer/actions).\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build"
  },
  {
    "path": "app/build.gradle",
    "content": "plugins {\n    id 'com.android.application'\n    id 'kotlin-android'\n}\n\nandroid {\n    compileSdk 32\n\n    defaultConfig {\n        applicationId \"com.raival.fileexplorer\"\n        minSdk 26\n        targetSdk 32\n        versionCode 2\n        versionName \"1.1.0\"\n\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    packagingOptions {\n        resources.excludes.add(\"license/*\")\n    }\n\n    signingConfigs {\n        debug {\n            storeFile file('../testkey.keystore')\n            storePassword 'testkey'\n            keyAlias 'testkey'\n            keyPassword 'testkey'\n        }\n        release {\n            storeFile file(\"../testkey.keystore\")\n            storePassword \"testkey\"\n            keyAlias \"testkey\"\n            keyPassword \"testkey\"\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile(\"proguard-android-optimize.txt\"), \"proguard-rules.pro\"\n            signingConfig signingConfigs.release\n        }\n    }\n    compileOptions {\n        coreLibraryDesugaringEnabled true\n\n        sourceCompatibility JavaVersion.VERSION_11\n        targetCompatibility JavaVersion.VERSION_11\n    }\n\n    kotlinOptions {\n        jvmTarget = '1.8'\n    }\n}\n\ndependencies {\n    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'\n\n    implementation fileTree(dir: \"libs\", include: [\"*.jar\"])\n\n    implementation \"androidx.appcompat:appcompat:1.5.1\"\n    implementation \"com.google.android.material:material:1.7.0\"\n    implementation \"com.google.code.gson:gson:2.9.1\"\n    implementation 'commons-io:commons-io:2.11.0'\n\n    implementation 'com.github.bumptech.glide:glide:4.14.0'\n    annotationProcessor 'com.github.bumptech.glide:compiler:4.14.0'\n\n    implementation \"com.pixplicity.easyprefs:EasyPrefs:1.10.0\"\n    implementation 'net.lingala.zip4j:zip4j:2.11.2'\n\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'\n    implementation \"io.github.Rosemoe.sora-editor:editor:0.17.1\", {\n        exclude group: \"androidx.annotation\", module: \"annotation\"\n    }\n    implementation \"io.github.Rosemoe.sora-editor:language-textmate:0.17.1\"\n    implementation \"io.github.Rosemoe.sora-editor:language-java:0.17.1\"\n\n    testImplementation \"junit:junit:4.13.2\"\n    androidTestImplementation \"androidx.test.ext:junit:1.1.3\"\n    androidTestImplementation \"androidx.test.espresso:espresso-core:3.4.0\"\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    package=\"com.raival.fileexplorer\">\n\n    <uses-permission\n        android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\"\n        tools:ignore=\"ScopedStorage\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />\n    <uses-permission\n        android:name=\"android.permission.QUERY_ALL_PACKAGES\"\n        tools:ignore=\"QueryAllPackagesPermission\" />\n\n    <application\n        android:name=\"com.raival.fileexplorer.App\"\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/app_icon\"\n        android:label=\"@string/app_name\"\n        android:largeHeap=\"true\"\n        android:requestLegacyExternalStorage=\"true\"\n        android:roundIcon=\"@mipmap/app_icon_round\"\n        android:theme=\"@style/Theme.FileExplorer\">\n        <activity\n            android:name=\".activity.SettingsActivity\"\n            android:exported=\"true\"\n            android:windowSoftInputMode=\"adjustResize\" />\n        <activity\n            android:name=\".activity.TextEditorActivity\"\n            android:exported=\"true\"\n            android:windowSoftInputMode=\"adjustResize\" />\n        <activity\n            android:name=\".activity.MainActivity\"\n            android:exported=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <provider\n            android:name=\"androidx.core.content.FileProvider\"\n            android:authorities=\"com.raival.fileexplorer.provider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/provider_paths\" />\n        </provider>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/assets/textmate/README.md",
    "content": "# Disclaimer\n\nThese files were copied from [CodeAssist](https://github.com/tyron12233/CodeAssist), and minor\nmodifications were applied to some of them. Original\nsource: https://github.com/tyron12233/CodeAssist/tree/main/app/src/main/assets/textmate"
  },
  {
    "path": "app/src/main/assets/textmate/dark.json",
    "content": "{\n  \"name\": \"darcula\",\n  \"settings\": [\n    {\n      \"settings\": {\n        \"background\": \"#1F1A1B\",\n        \"foreground\": \"#cccccc\",\n        \"lineHighlight\": \"#2B2B2B\",\n        \"blockLineColor\": \"#575757\",\n        \"currentBlockLineColor\": \"#7a7a7a\",\n        \"selection\": \"#214283\",\n        \"completionWindowBackground\": \"#1F1A1B\",\n        \"completionWindowStroke\": \"#555555\"\n      }\n    },\n    {\n      \"name\": \"Package declaration\",\n      \"scope\": \"storage.modifier.package\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Import declaration\",\n      \"scope\": \"storage.modifier.import\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Class names (Identifiers starting with uppercase)\",\n      \"scope\": \"storage.type.java\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Annotation\",\n      \"scope\": \"storage.type.annotation\",\n      \"settings\": {\n        \"foreground\": \"#BBB529\"\n      }\n    },\n    {\n      \"name\": \"Comment\",\n      \"scope\": \"comment\",\n      \"settings\": {\n        \"foreground\": \"#707070\"\n      }\n    },\n    {\n      \"name\": \"Operator Keywords\",\n      \"scope\": \"keyword.operator,keyword.operator.logical,keyword.operator.relational,keyword.operator.assignment,keyword.operator.comparison,keyword.operator.ternary,keyword.operator.arithmetic,keyword.operator.spread\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Strings\",\n      \"scope\": \"string,string.character.escape,string.template.quoted,string.template.quoted.punctuation,string.template.quoted.punctuation.single,string.template.quoted.punctuation.double,string.type.declaration.annotation,string.template.quoted.punctuation.tag\",\n      \"settings\": {\n        \"foreground\": \"#6A8759\"\n      }\n    },\n    {\n      \"name\": \"String Interpolation Begin and End\",\n      \"scope\": \"punctuation.definition.template-expression.begin,punctuation.definition.template-expression.end\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"String Interpolation Body\",\n      \"scope\": \"expression.string,meta.template.expression\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Number\",\n      \"scope\": \"constant.numeric\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"Built-in constant\",\n      \"scope\": \"constant.language,variable.language\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"User-defined constant\",\n      \"scope\": \"constant.character, constant.other\",\n      \"settings\": {\n        \"foreground\": \"#9E7BB0\"\n      }\n    },\n    {\n      \"name\": \"Keyword\",\n      \"scope\": \"keyword,keyword.operator.new,keyword.operator.delete,keyword.operator.static,keyword.operator.this,keyword.operator.expression\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Method return type\",\n      \"scope\": \"meta.method.return-type\",\n      \"settings\": {\n        \"foreground\": \"#A9B7C6\"\n      }\n    },\n    {\n      \"name\": \"Method call identifier\",\n      \"scope\": \"meta.method-call\",\n      \"settings\": {\n        \"foreground\": \"#A9B7C6\"\n      }\n    },\n    {\n      \"name\": \"Types, Class Types\",\n      \"scope\": \"entity.name.type,meta.return.type,meta.type.annotation,meta.type.parameters,support.type.primitive\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"Storage type\",\n      \"scope\": \"storage,storage.type,storage.modifier,storage.arrow\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Class constructor\",\n      \"scope\": \"class.instance.constructor,new.expr entity.name.type\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"Function\",\n      \"scope\": \"support.function, entity.name.function\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"Function Types\",\n      \"scope\": \"annotation.meta.ts, annotation.meta.tsx\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Function Argument\",\n      \"scope\": \"variable.parameter, operator.rest.parameters\",\n      \"settings\": {\n        \"foreground\": \"#A9B7C6\"\n      }\n    },\n    {\n      \"name\": \"Variable, Property\",\n      \"scope\": \"variable.property,variable.other.property,variable.other.object.property,variable.object.property,support.variable.property\",\n      \"settings\": {\n        \"foreground\": \"#9E7BB0\"\n      }\n    },\n    {\n      \"name\": \"Variable name\",\n      \"scope\": \"entity.name.variable\",\n      \"settings\": {\n        \"foreground\": \"#A9B7C6\"\n      }\n    },\n    {\n      \"name\": \"CONSTANT\",\n      \"scope\": \"variable.other.constant\",\n      \"settings\": {\n        \"foreground\": \"#9876AA\"\n      }\n    },\n    {\n      \"name\": \"Module Name\",\n      \"scope\": \"quote.module\",\n      \"settings\": {\n        \"foreground\": \"#6A8759\"\n      }\n    },\n    {\n      \"name\": \"Markup Headings\",\n      \"scope\": \"markup.heading\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Tag name\",\n      \"scope\": \"punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end, entity.name.tag\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"Tag attribute\",\n      \"scope\": \"entity.other.attribute-name\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Object Keys\",\n      \"scope\": \"meta.object-literal.key\",\n      \"settings\": {\n        \"foreground\": \"#9E7BB0\"\n      }\n    },\n    {\n      \"name\": \"TypeScript Class Modifiers\",\n      \"scope\": \"storage.modifier.ts\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"TypeScript Type Casting\",\n      \"scope\": \"ts.cast.expr,ts.meta.entity.class.method.new.expr.cast,ts.meta.entity.type.name.new.expr.cast,ts.meta.entity.type.name.var-single-variable.annotation,tsx.cast.expr,tsx.meta.entity.class.method.new.expr.cast,tsx.meta.entity.type.name.new.expr.cast,tsx.meta.entity.type.name.var-single-variable.annotation\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"TypeScript Type Declaration\",\n      \"scope\": \"ts.meta.type.support,ts.meta.type.entity.name,ts.meta.class.inherited-class,tsx.meta.type.support,tsx.meta.type.entity.name,tsx.meta.class.inherited-class,type-declaration,enum-declaration\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"TypeScript Method Declaration\",\n      \"scope\": \"function-declaration,method-declaration,method-overload-declaration,type-fn-type-parameters\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"Documentation Block\",\n      \"scope\": \"comment.block.documentation\",\n      \"settings\": {\n        \"foreground\": \"#6A8759\"\n      }\n    },\n    {\n      \"name\": \"Documentation Highlight (JSDoc)\",\n      \"scope\": \"storage.type.class.jsdoc\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Import-Export-All (*) Keyword\",\n      \"scope\": \"constant.language.import-export-all\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Object Key Seperator\",\n      \"scope\": \"objectliteral.key.separator, punctuation.separator.key-value\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Regex\",\n      \"scope\": \"regex\",\n      \"settings\": {\n        \"fontStyle\": \" italic\"\n      }\n    },\n    {\n      \"name\": \"Typescript Namespace\",\n      \"scope\": \"ts.meta.entity.name.namespace,tsx.meta.entity.name.namespace\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Regex Character-class\",\n      \"scope\": \"regex.character-class\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Class Name\",\n      \"scope\": \"entity.name.type.class\",\n      \"settings\": {\n        \"foreground\": \"#A9B7C6\"\n      }\n    },\n    {\n      \"name\": \"Class Inheritances\",\n      \"scope\": \"entity.other.inherited-class\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"Documentation Entity\",\n      \"scope\": \"entity.name.type.instance.jsdoc\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"YAML entity\",\n      \"scope\": \"yaml.entity.name,yaml.string.entity.name\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"YAML string value\",\n      \"scope\": \"yaml.string.out\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Ignored (Exceptions Rules)\",\n      \"scope\": \"meta.brace.square.ts,block.support.module,block.support.type.module,block.support.function.variable,punctuation.definition.typeparameters.begin,punctuation.definition.typeparameters.end\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Regex\",\n      \"scope\": \"string.regexp\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Regex Group/Set\",\n      \"scope\": \"punctuation.definition.group.regexp,punctuation.definition.character-class.regexp\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"Regex Character Class\",\n      \"scope\": \"constant.other.character-class.regexp, constant.character.escape.ts\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Regex Or Operator\",\n      \"scope\": \"expr.regex.or.operator\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Tag string\",\n      \"scope\": \"string.template.tag,string.template.punctuation.tag,string.quoted.punctuation.tag,string.quoted.embedded.tag, string.quoted.double.tag\",\n      \"settings\": {\n        \"foreground\": \"#6A8759\"\n      }\n    },\n    {\n      \"name\": \"Tag function parenthesis\",\n      \"scope\": \"tag.punctuation.begin.arrow.parameters.embedded,tag.punctuation.end.arrow.parameters.embedded\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"Object-literal key class\",\n      \"scope\": \"object-literal.object.member.key.field.other,object-literal.object.member.key.accessor,object-literal.object.member.key.array.brace.square\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\"\n      }\n    },\n    {\n      \"name\": \"CSS Property-value\",\n      \"scope\": \"property-list.property-value,property-list.constant\",\n      \"settings\": {\n        \"foreground\": \"#A5C261\"\n      }\n    },\n    {\n      \"name\": \"CSS Property variable\",\n      \"scope\": \"support.type.property-name.variable.css,support.type.property-name.variable.scss,variable.scss\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"CSS Property entity\",\n      \"scope\": \"entity.other.attribute-name.class.css,entity.other.attribute-name.class.scss,entity.other.attribute-name.parent-selector-suffix.css,entity.other.attribute-name.parent-selector-suffix.scss\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"CSS Property-value\",\n      \"scope\": \"property-list.property-value.rgb-value, keyword.other.unit.css,keyword.other.unit.scss\",\n      \"settings\": {\n        \"foreground\": \"#7A9EC2\"\n      }\n    },\n    {\n      \"name\": \"CSS Property-value function\",\n      \"scope\": \"property-list.property-value.function\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"CSS constant variables\",\n      \"scope\": \"support.constant.property-value.css,support.constant.property-value.scss\",\n      \"settings\": {\n        \"foreground\": \"#A5C261\"\n      }\n    },\n    {\n      \"name\": \"CSS Tag\",\n      \"scope\": \"css.entity.name.tag,scss.entity.name.tag\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"CSS ID, Selector\",\n      \"scope\": \"meta.selector.css, entity.attribute-name.id, entity.other.attribute-name.pseudo-class.css,entity.other.attribute-name.pseudo-element.css\",\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"CSS Keyword\",\n      \"scope\": \"keyword.scss,keyword.css\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Triple-slash Directive Tag\",\n      \"scope\": \"triple-slash.tag\",\n      \"settings\": {\n        \"foreground\": \"#CCCCCC\",\n        \"fontStyle\": \"italic\"\n      }\n    },\n    {\n      \"scope\": \"token.info-token\",\n      \"settings\": {\n        \"foreground\": \"#6796e6\"\n      }\n    },\n    {\n      \"scope\": \"token.warn-token\",\n      \"settings\": {\n        \"foreground\": \"#cd9731\"\n      }\n    },\n    {\n      \"scope\": \"token.error-token\",\n      \"settings\": {\n        \"foreground\": \"#f44747\"\n      }\n    },\n    {\n      \"scope\": \"token.debug-token\",\n      \"settings\": {\n        \"foreground\": \"#b267e6\"\n      }\n    },\n    {\n      \"name\": \"Python operators\",\n      \"scope\": \"keyword.operator.logical.python\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"Dart class type\",\n      \"scope\": \"support.class.dart\",\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"PHP variables\",\n      \"scope\": [\n        \"variable.language.php\",\n        \"variable.other.php\"\n      ],\n      \"settings\": {\n        \"foreground\": \"#9E7BB0\"\n      }\n    },\n    {\n      \"name\": \"Perl specific\",\n      \"scope\": [\n        \"variable.other.readwrite.perl\"\n      ],\n      \"settings\": {\n        \"foreground\": \"#9E7BB0\"\n      }\n    },\n    {\n      \"name\": \"PHP variables\",\n      \"scope\": [\n        \"variable.other.property.php\"\n      ],\n      \"settings\": {\n        \"foreground\": \"#CC8242\"\n      }\n    },\n    {\n      \"name\": \"PHP variables\",\n      \"scope\": [\n        \"support.variable.property.php\"\n      ],\n      \"settings\": {\n        \"foreground\": \"#FFC66D\"\n      }\n    },\n    {\n      \"name\": \"XML Namespace prefix\",\n      \"scope\": \"entity.name.tag.namesapce.xml\",\n      \"settings\": {\n        \"foreground\": \"#9876AA\"\n      }\n    }\n  ]\n}"
  },
  {
    "path": "app/src/main/assets/textmate/json/language-configuration.json",
    "content": "{\n  \"comments\": {\n    \"lineComment\": \"//\",\n    \"blockComment\": [\n      \"/*\",\n      \"*/\"\n    ]\n  },\n  \"brackets\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ]\n  ],\n  \"autoClosingPairs\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    {\n      \"open\": \"\\\"\",\n      \"close\": \"\\\"\",\n      \"notIn\": [\n        \"string\"\n      ]\n    },\n    {\n      \"open\": \"'\",\n      \"close\": \"'\",\n      \"notIn\": [\n        \"string\"\n      ]\n    },\n    {\n      \"open\": \"/**\",\n      \"close\": \" */\",\n      \"notIn\": [\n        \"string\"\n      ]\n    }\n  ],\n  \"surroundingPairs\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"\\\"\",\n      \"\\\"\"\n    ]\n  ],\n  \"folding\": {\n    \"offSide\": false,\n    \"markers\": {\n      \"start\": \"^\\\\s*//\\\\s*#region\",\n      \"end\": \"^\\\\s*//\\\\s*#endregion\"\n    }\n  }\n}"
  },
  {
    "path": "app/src/main/assets/textmate/json/syntax/json.tmLanguage.json",
    "content": "{\n  \"scopeName\": \"source.json\",\n  \"name\": \"JSON\",\n  \"fileTypes\": [\n    \"avsc\",\n    \"babelrc\",\n    \"bowerrc\",\n    \"composer.lock\",\n    \"geojson\",\n    \"gltf\",\n    \"htmlhintrc\",\n    \"ipynb\",\n    \"jscsrc\",\n    \"jshintrc\",\n    \"jslintrc\",\n    \"json\",\n    \"jsonl\",\n    \"jsonld\",\n    \"languagebabel\",\n    \"ldj\",\n    \"ldjson\",\n    \"Pipfile.lock\",\n    \"schema\",\n    \"stylintrc\",\n    \"template\",\n    \"tern-config\",\n    \"tern-project\",\n    \"tfstate\",\n    \"tfstate.backup\",\n    \"topojson\",\n    \"webapp\",\n    \"webmanifest\"\n  ],\n  \"patterns\": [\n    {\n      \"include\": \"#value\"\n    }\n  ],\n  \"repository\": {\n    \"array\": {\n      \"begin\": \"\\\\[\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.array.begin.json\"\n        }\n      },\n      \"end\": \"(,)?[\\\\s\\\\n]*(\\\\])\",\n      \"endCaptures\": {\n        \"1\": {\n          \"name\": \"invalid.illegal.trailing-array-separator.json\"\n        },\n        \"2\": {\n          \"name\": \"punctuation.definition.array.end.json\"\n        }\n      },\n      \"name\": \"meta.structure.array.json\",\n      \"patterns\": [\n        {\n          \"include\": \"#value\"\n        },\n        {\n          \"match\": \",\",\n          \"name\": \"punctuation.separator.array.json\"\n        },\n        {\n          \"match\": \"[^\\\\s\\\\]]\",\n          \"name\": \"invalid.illegal.expected-array-separator.json\"\n        }\n      ]\n    },\n    \"constant\": {\n      \"match\": \"\\\\b(true|false|null)\\\\b\",\n      \"name\": \"constant.language.json\"\n    },\n    \"number\": {\n      \"match\": \"-?(?=[1-9]|0(?!\\\\d))\\\\d+(\\\\.\\\\d+)?([eE][+-]?\\\\d+)?\",\n      \"name\": \"constant.numeric.json\"\n    },\n    \"object\": {\n      \"begin\": \"{\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.dictionary.begin.json\"\n        }\n      },\n      \"end\": \"}\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.dictionary.end.json\"\n        }\n      },\n      \"name\": \"meta.structure.dictionary.json\",\n      \"patterns\": [\n        {\n          \"begin\": \"(?=\\\")\",\n          \"end\": \"(?<=\\\")\",\n          \"name\": \"meta.structure.dictionary.key.json\",\n          \"patterns\": [\n            {\n              \"include\": \"#string\"\n            }\n          ]\n        },\n        {\n          \"begin\": \":\",\n          \"beginCaptures\": {\n            \"0\": {\n              \"name\": \"punctuation.separator.dictionary.key-value.json\"\n            }\n          },\n          \"end\": \"(,)(?=[\\\\s\\\\n]*})|(,)|(?=})\",\n          \"endCaptures\": {\n            \"1\": {\n              \"name\": \"invalid.illegal.trailing-dictionary-separator.json\"\n            },\n            \"2\": {\n              \"name\": \"punctuation.separator.dictionary.pair.json\"\n            }\n          },\n          \"name\": \"meta.structure.dictionary.value.json\",\n          \"patterns\": [\n            {\n              \"include\": \"#value\"\n            },\n            {\n              \"match\": \"[^\\\\s,]\",\n              \"name\": \"invalid.illegal.expected-dictionary-separator.json\"\n            }\n          ]\n        },\n        {\n          \"match\": \"[^\\\\s}]\",\n          \"name\": \"invalid.illegal.expected-dictionary-separator.json\"\n        }\n      ]\n    },\n    \"string\": {\n      \"begin\": \"\\\"\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.begin.json\"\n        }\n      },\n      \"end\": \"\\\"\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.end.json\"\n        }\n      },\n      \"name\": \"string.quoted.double.json\",\n      \"patterns\": [\n        {\n          \"match\": \"(?x)\\n\\\\\\\\                # a literal backslash\\n(                   # followed by\\n  [\\\"\\\\\\\\/bfnrt]     # one of these characters\\n  |                 # or\\n  u[0-9a-fA-F]{4}   # a u and four hex digits\\n)\",\n          \"name\": \"constant.character.escape.json\"\n        },\n        {\n          \"match\": \"\\\\\\\\.\",\n          \"name\": \"invalid.illegal.unrecognized-string-escape.json\"\n        }\n      ]\n    },\n    \"value\": {\n      \"patterns\": [\n        {\n          \"include\": \"#constant\"\n        },\n        {\n          \"include\": \"#number\"\n        },\n        {\n          \"include\": \"#string\"\n        },\n        {\n          \"include\": \"#array\"\n        },\n        {\n          \"include\": \"#object\"\n        }\n      ]\n    }\n  }\n}"
  },
  {
    "path": "app/src/main/assets/textmate/kotlin/language-configuration.json",
    "content": "{\n  \"comments\": {\n    \"lineComment\": \"//\",\n    \"blockComment\": [\n      \"/*\",\n      \"*/\"\n    ]\n  },\n  \"brackets\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"(\",\n      \")\"\n    ],\n    [\n      \"<\",\n      \">\"\n    ]\n  ],\n  \"autoClosingPairs\": [\n    {\n      \"open\": \"{\",\n      \"close\": \"}\"\n    },\n    {\n      \"open\": \"[\",\n      \"close\": \"]\"\n    },\n    {\n      \"open\": \"(\",\n      \"close\": \")\"\n    },\n    {\n      \"open\": \"'\",\n      \"close\": \"'\",\n      \"notIn\": [\n        \"string\",\n        \"comment\"\n      ]\n    },\n    {\n      \"open\": \"\\\"\",\n      \"close\": \"\\\"\",\n      \"notIn\": [\n        \"string\"\n      ]\n    },\n    {\n      \"open\": \"/*\",\n      \"close\": \" */\",\n      \"notIn\": [\n        \"string\"\n      ]\n    }\n  ],\n  \"surroundingPairs\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"(\",\n      \")\"\n    ],\n    [\n      \"<\",\n      \">\"\n    ],\n    [\n      \"'\",\n      \"'\"\n    ],\n    [\n      \"\\\"\",\n      \"\\\"\"\n    ]\n  ],\n  \"folding\": {\n    \"offSide\": false,\n    \"markers\": {\n      \"start\": \"^\\\\s*//\\\\s*#region\",\n      \"end\": \"^\\\\s*//\\\\s*#endregion\"\n    }\n  }\n}"
  },
  {
    "path": "app/src/main/assets/textmate/kotlin/syntax/kotlin.tmLanguage",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n    <dict>\n        <key>fileTypes</key>\n        <array>\n            <string>kt</string>\n            <string>kts</string>\n        </array>\n        <key>foldingStartMarker</key>\n        <string>(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)</string>\n        <key>foldingStopMarker</key>\n        <string>^\\s*(\\}|// \\}\\}\\}$)</string>\n        <key>name</key>\n        <string>Kotlin</string>\n        <key>patterns</key>\n        <array>\n            <dict>\n                <key>include</key>\n                <string>#comments</string>\n            </dict>\n            <dict>\n                <key>captures</key>\n                <dict>\n                    <key>1</key>\n                    <dict>\n                        <key>name</key>\n                        <string>keyword.other.kotlin</string>\n                    </dict>\n                    <key>2</key>\n                    <dict>\n                        <key>name</key>\n                        <string>entity.name.package.kotlin</string>\n                    </dict>\n                </dict>\n                <key>match</key>\n                <string>^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*)?</string>\n            </dict>\n            <dict>\n                <key>captures</key>\n                <dict>\n                    <key>1</key>\n                    <dict>\n                        <key>name</key>\n                        <string>keyword.other.import.kotlin</string>\n                    </dict>\n                </dict>\n                <key>match</key>\n                <string>^\\s*(import)\\s+([^ $.]+(?:\\.(?:[`][^$`]+[`]|[^` $.]+))+)(?:\\s+(as)\\s+([`][^$`]+[`]|[^` $.]+))?</string>\n                <key>name</key>\n                <string>meta.import.kotlin</string>\n            </dict>\n            <dict>\n                <key>include</key>\n                <string>#code</string>\n            </dict>\n        </array>\n        <key>repository</key>\n        <dict>\n            <key>annotations</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>(@[^ (]+)(\\()?</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>storage.type.annotation.kotlin</string>\n                            </dict>\n                            <key>2</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.annotation-arguments.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(\\)|\\s|$)</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.annotation-arguments.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>meta.declaration.annotation.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>captures</key>\n                                <dict>\n                                    <key>1</key>\n                                    <dict>\n                                        <key>name</key>\n                                        <string>constant.other.key.kotlin</string>\n                                    </dict>\n                                    <key>2</key>\n                                    <dict>\n                                        <key>name</key>\n                                        <string>keyword.operator.assignment.kotlin</string>\n                                    </dict>\n                                </dict>\n                                <key>match</key>\n                                <string>(\\w*)\\s*(=)</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#code</string>\n                            </dict>\n                            <dict>\n                                <key>match</key>\n                                <string>,</string>\n                                <key>name</key>\n                                <string>punctuation.seperator.property.kotlin</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>@\\w*</string>\n                        <key>name</key>\n                        <string>storage.type.annotation.kotlin</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>builtin-functions</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(apply|also|let|takeIf|run|takeUnless|with|print|println)\\b\\s*(?={|\\()</string>\n                        <key>captures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>support.function.kotlin</string>\n                            </dict>\n                        </dict>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(mutableListOf|listOf|mutableMapOf|mapOf|mutableSetOf|setOf)\\b\\s*(?={|\\()</string>\n                        <key>captures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>support.function.kotlin</string>\n                            </dict>\n                        </dict>\n                    </dict>\n                </array>\n            </dict>\n            <key>comments</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>captures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.comment.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>match</key>\n                        <string>/\\*\\*/</string>\n                        <key>name</key>\n                        <string>comment.block.empty.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#comments-inline</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>comments-inline</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>/\\*</string>\n                        <key>captures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.comment.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\*/</string>\n                        <key>name</key>\n                        <string>comment.block.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>captures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>comment.line.double-slash.kotlin</string>\n                            </dict>\n                            <key>2</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.comment.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>match</key>\n                        <string>\\s*((//).*$\\n?)</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>class-literal</key>\n            <dict>\n                <key>begin</key>\n                <string>(?=\\b(?:class|interface|object)\\s+\\w+)\\b</string>\n                <key>end</key>\n                <string>(?=\\}|$)</string>\n                <key>name</key>\n                <string>meta.class.kotlin</string>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-literal</string>\n                    </dict>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\b(class|object|interface)\\b\\s+(\\w+)</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>storage.modifier.kotlin</string>\n                            </dict>\n                            <key>2</key>\n                            <dict>\n                                <key>name</key>\n                                <string>entity.name.class.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(?=\\{|\\(|:|$)</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#keyword-literal</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#annotations</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>begin</key>\n                        <string>(:)\\s*(\\w+)</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>keyword.operator.declaration.kotlin</string>\n                            </dict>\n                            <key>2</key>\n                            <dict>\n                                <key>name</key>\n                                <string>entity.other.inherited-class.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(?={|=|$)</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#braces</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#parens</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>literal-functions</key>\n            <dict>\n                <key>begin</key>\n                <string>(?=\\b(?:fun)\\b)</string>\n                <key>end</key>\n                <string>(?=$|=|\\})</string>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\b(fun)\\b</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>keyword.other.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(?=\\()</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>captures</key>\n                                <dict>\n                                    <key>2</key>\n                                    <dict>\n                                        <key>name</key>\n                                        <string>entity.name.function.kotlin</string>\n                                    </dict>\n                                </dict>\n                                <key>match</key>\n                                <string>([\\.&lt;\\?&gt;\\w]+\\.)?(\\w+|(`[^`]*`))</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>begin</key>\n                        <string>(:)</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>keyword.operator.declaration.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(?={|=|$)</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#parens</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#braces</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>parameters</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>(:)</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>keyword.operator.declaration.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>(?=,|=|\\))</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\w+(?=:)</string>\n                        <key>name</key>\n                        <string>variable.parameter.function.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-literal</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>keyword-literal</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\!in|\\!is|as\\?)</string>\n                        <key>name</key>\n                        <string>keyword.operator.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(in|is|as|assert)\\b</string>\n                        <key>name</key>\n                        <string>keyword.operator.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(const)\\b</string>\n                        <key>name</key>\n                        <string>storage.modifier.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(val|var)\\b</string>\n                        <key>name</key>\n                        <string>storage.type.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(\\_)\\b</string>\n                        <key>name</key>\n                        <string>punctuation.definition.variable.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(data|inline|tailrec|operator|infix|typealias|reified)\\b</string>\n                        <key>name</key>\n                        <string>storage.type.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(external|public|private|protected|internal|abstract|final|sealed|enum|open|annotation|override|vararg|typealias|expect|actual|suspend|yield|out|in)\\b</string>\n                        <key>name</key>\n                        <string>storage.modifier.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(try|catch|finally|throw)\\b</string>\n                        <key>name</key>\n                        <string>keyword.control.catch-exception.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(if|else|when)\\b</string>\n                        <key>name</key>\n                        <string>keyword.control.conditional.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(while|for|do|return|break|continue)\\b</string>\n                        <key>name</key>\n                        <string>keyword.control.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(constructor|init)\\b</string>\n                        <key>name</key>\n                        <string>entity.name.function.constructor</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(companion|object)\\b</string>\n                        <key>name</key>\n                        <string>storage.type.kotlin</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>keyword-operator</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(and|or|not|inv)\\b</string>\n                        <key>name</key>\n                        <string>keyword.operator.bitwise.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(==|!=|===|!==|&lt;=|&gt;=|&lt;|&gt;)</string>\n                        <key>name</key>\n                        <string>keyword.operator.comparison.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(=)</string>\n                        <key>name</key>\n                        <string>keyword.operator.assignment.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(:(?!:))</string>\n                        <key>name</key>\n                        <string>keyword.operator.declaration.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\?:)</string>\n                        <key>name</key>\n                        <string>keyword.operator.elvis.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\-\\-|\\+\\+)</string>\n                        <key>name</key>\n                        <string>keyword.operator.increment-decrement.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\-|\\+|\\*|\\/|%)</string>\n                        <key>name</key>\n                        <string>keyword.operator.arithmetic.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\+\\=|\\-\\=|\\*\\=|\\/\\=)</string>\n                        <key>name</key>\n                        <string>keyword.operator.arithmetic.assign.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\!|\\&amp;\\&amp;|\\|\\|)</string>\n                        <key>name</key>\n                        <string>keyword.operator.logical.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\.\\.)</string>\n                        <key>name</key>\n                        <string>keyword.operator.range.kotlin</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>keyword-punctuation</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>(::)</string>\n                        <key>name</key>\n                        <string>punctuation.accessor.reference.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\?\\.)</string>\n                        <key>name</key>\n                        <string>punctuation.accessor.dot.safe.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\.)</string>\n                        <key>name</key>\n                        <string>punctuation.accessor.dot.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\,)</string>\n                        <key>name</key>\n                        <string>punctuation.seperator.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>(\\;)</string>\n                        <key>name</key>\n                        <string>punctuation.terminator.kotlin</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>keyword-constant</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(true|false|null|class)\\b</string>\n                        <key>name</key>\n                        <string>constant.language.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(this|super)\\b</string>\n                        <key>name</key>\n                        <string>variable.language.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(0(x|X)[0-9A-Fa-f_]*)[L]?\\b</string>\n                        <key>name</key>\n                        <string>constant.numeric.hex.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(0(b|B)[0-1_]*)[L]?\\b</string>\n                        <key>name</key>\n                        <string>constant.numeric.binary.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b([0-9][0-9_]*\\.[0-9][0-9_]*[fFL]?)\\b</string>\n                        <key>name</key>\n                        <string>constant.numeric.float.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b([0-9][0-9_]*[fFL]?)\\b</string>\n                        <key>name</key>\n                        <string>constant.numeric.integer.kotlin</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>literal-string</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\"</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.string.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\"</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.string.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>string.quoted.double.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#string-content</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>literal-raw-string</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\"\"\"</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.string.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\"\"\"</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.string.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>string.quoted.triple.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#string-content</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>string-content</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>name</key>\n                        <string>constant.character.escape.newline.kotlin</string>\n                        <key>match</key>\n                        <string>\\\\\\s*\\n</string>\n                    </dict>\n                    <dict>\n                        <key>name</key>\n                        <string>constant.character.escape.kotlin</string>\n                        <key>match</key>\n                        <string>\\\\(x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|.)</string>\n                    </dict>\n                    <dict>\n                        <key>begin</key>\n                        <string>(\\$)(\\{)</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.definition.keyword.kotlin</string>\n                            </dict>\n                            <key>2</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.block.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\}</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.block.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>entity.string.template.element.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#code</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>types</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(Nothing|Any|Unit|String|CharSequence|Int|Boolean|Char|Long|Double|Float|Short|Byte|Array|List|Map|Set|dynamic)\\b(\\?)?</string>\n                        <key>name</key>\n                        <string>support.class.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\\b(\\?)?</string>\n                        <key>name</key>\n                        <string>support.class.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>((?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)(\\?)</string>\n                        <key>name</key>\n                        <string>entity.name.type.class.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#keyword-punctuation</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>match</key>\n                        <string>\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b</string>\n                        <key>captures</key>\n                        <dict>\n                            <key>1</key>\n                            <dict>\n                                <key>name</key>\n                                <string>keyword.operator.dereference.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>entity.name.type.class.kotlin</string>\n                    </dict>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\(</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\)</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#types</string>\n                            </dict>\n                        </array>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-punctuation</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-operator</string>\n                    </dict>\n                </array>\n            </dict>\n            <key>parens</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\(</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\)</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>meta.group.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#keyword-punctuation</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#parameters</string>\n                            </dict>\n                            <dict>\n                                <key>include</key>\n                                <string>#code</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>braces</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\{</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\}</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.group.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>meta.block.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#code</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>brackets</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>begin</key>\n                        <string>\\[</string>\n                        <key>beginCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.brackets.begin.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>end</key>\n                        <string>\\]</string>\n                        <key>endCaptures</key>\n                        <dict>\n                            <key>0</key>\n                            <dict>\n                                <key>name</key>\n                                <string>punctuation.section.brackets.end.kotlin</string>\n                            </dict>\n                        </dict>\n                        <key>name</key>\n                        <string>meta.brackets.kotlin</string>\n                        <key>patterns</key>\n                        <array>\n                            <dict>\n                                <key>include</key>\n                                <string>#code</string>\n                            </dict>\n                        </array>\n                    </dict>\n                </array>\n            </dict>\n            <key>code</key>\n            <dict>\n                <key>patterns</key>\n                <array>\n                    <dict>\n                        <key>include</key>\n                        <string>#comments</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#comments-inline</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#annotations</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#class-literal</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#parens</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#braces</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#brackets</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-literal</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#types</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-operator</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-constant</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#keyword-punctuation</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#builtin-functions</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#literal-functions</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#builtin-classes</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#literal-raw-string</string>\n                    </dict>\n                    <dict>\n                        <key>include</key>\n                        <string>#literal-string</string>\n                    </dict>\n                </array>\n            </dict>\n        </dict>\n        <key>scopeName</key>\n        <string>source.kotlin</string>\n        <key>uuid</key>\n        <string>d9380650-5edc-447d-8dbd-98838c7d0adf</string>\n    </dict>\n</plist>"
  },
  {
    "path": "app/src/main/assets/textmate/light.tmTheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\"\n    \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n    <dict>\n        <key>author</key>\n        <string>Martin KÃ¼hl</string>\n        <key>comment</key>\n        <string>Based on the Quiet Light theme for Espresso by Ian Beck.</string>\n        <key>name</key>\n        <string>Quiet Light</string>\n        <key>settings</key>\n        <array>\n            <dict>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#F5F5F5</string>\n                    <key>caret</key>\n                    <string>#000000</string>\n                    <key>foreground</key>\n                    <string>#333333</string>\n                    <key>invisibles</key>\n                    <string>#AAAAAA</string>\n                    <key>lineHighlight</key>\n                    <string>#E4F6D4</string>\n                    <key>selection</key>\n                    <string>#C9D0D9</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Comments</string>\n                <key>scope</key>\n                <string>comment, punctuation.definition.comment</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>italic</string>\n                    <key>foreground</key>\n                    <string>#AAAAAA</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Comments: Preprocessor</string>\n                <key>scope</key>\n                <string>comment.block.preprocessor</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string></string>\n                    <key>foreground</key>\n                    <string>#AAAAAA</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Comments: Documentation</string>\n                <key>scope</key>\n                <string>comment.documentation, comment.block.documentation</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#448C27</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Invalid - Deprecated</string>\n                <key>scope</key>\n                <string>invalid.deprecated</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#96000014</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Invalid - Illegal</string>\n                <key>scope</key>\n                <string>invalid.illegal</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#96000014</string>\n                    <key>foreground</key>\n                    <string>#660000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Operators</string>\n                <key>scope</key>\n                <string>keyword.operator</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#777777</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Keywords</string>\n                <key>scope</key>\n                <string>keyword, storage</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#4B83CD</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Types</string>\n                <key>scope</key>\n                <string>storage.type, support.type</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#7A3E9D</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Language Constants</string>\n                <key>scope</key>\n                <string>constant.language, support.constant, variable.language</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Variables</string>\n                <key>scope</key>\n                <string>variable, support.variable</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#7A3E9D</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Functions</string>\n                <key>scope</key>\n                <string>entity.name.function, support.function</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>bold</string>\n                    <key>foreground</key>\n                    <string>#AA3731</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Classes</string>\n                <key>scope</key>\n                <string>entity.name.type, entity.other.inherited-class, support.class</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>bold</string>\n                    <key>foreground</key>\n                    <string>#7A3E9D</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Exceptions</string>\n                <key>scope</key>\n                <string>entity.name.exception</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#660000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Sections</string>\n                <key>scope</key>\n                <string>entity.name.section</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>bold</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Numbers, Characters</string>\n                <key>scope</key>\n                <string>constant.numeric, constant.character, constant</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Strings</string>\n                <key>scope</key>\n                <string>string</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#448C27</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Strings: Escape Sequences</string>\n                <key>scope</key>\n                <string>constant.character.escape</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#777777</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Strings: Regular Expressions</string>\n                <key>scope</key>\n                <string>string.regexp</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#4B83CD</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Strings: Symbols</string>\n                <key>scope</key>\n                <string>constant.other.symbol</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Punctuation</string>\n                <key>scope</key>\n                <string>punctuation</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#777777</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Embedded Source</string>\n                <key>scope</key>\n                <string>string source, text source</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#EAEBE6</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>-----------------------------------</string>\n                <key>settings</key>\n                <dict />\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>HTML: Doctype Declaration</string>\n                <key>scope</key>\n                <string>meta.tag.sgml.doctype, meta.tag.sgml.doctype string, meta.tag.sgml.doctype\n                    entity.name.tag, meta.tag.sgml punctuation.definition.tag.html\n                </string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AAAAAA</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>HTML: Tags</string>\n                <key>scope</key>\n                <string>meta.tag, punctuation.definition.tag.html,\n                    punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html\n                </string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#91B3E0</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>HTML: Tag Names</string>\n                <key>scope</key>\n                <string>entity.name.tag</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#4B83CD</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>HTML: Attribute Names</string>\n                <key>scope</key>\n                <string>meta.tag entity.other.attribute-name, entity.other.attribute-name.html\n                </string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#91B3E0</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>HTML: Entities</string>\n                <key>scope</key>\n                <string>constant.character.entity, punctuation.definition.entity</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>-----------------------------------</string>\n                <key>settings</key>\n                <dict />\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>CSS: Selectors</string>\n                <key>scope</key>\n                <string>meta.selector, meta.selector entity, meta.selector entity punctuation,\n                    entity.name.tag.css\n                </string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#7A3E9D</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>CSS: Property Names</string>\n                <key>scope</key>\n                <string>meta.property-name, support.type.property-name</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>CSS: Property Values</string>\n                <key>scope</key>\n                <string>meta.property-value, meta.property-value constant.other,\n                    support.constant.property-value\n                </string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#448C27</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>CSS: Important Keyword</string>\n                <key>scope</key>\n                <string>keyword.other.important</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>bold</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>-----------------------------------</string>\n                <key>settings</key>\n                <dict />\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Changed</string>\n                <key>scope</key>\n                <string>markup.changed</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#FFFFDD</string>\n                    <key>foreground</key>\n                    <string>#000000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Deletion</string>\n                <key>scope</key>\n                <string>markup.deleted</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#FFDDDD</string>\n                    <key>foreground</key>\n                    <string>#000000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Emphasis</string>\n                <key>scope</key>\n                <string>markup.italic</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>italic</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Error</string>\n                <key>scope</key>\n                <string>markup.error</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#96000014</string>\n                    <key>foreground</key>\n                    <string>#660000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Insertion</string>\n                <key>scope</key>\n                <string>markup.inserted</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#DDFFDD</string>\n                    <key>foreground</key>\n                    <string>#000000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Link</string>\n                <key>scope</key>\n                <string>meta.link</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#4B83CD</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Output</string>\n                <key>scope</key>\n                <string>markup.output, markup.raw</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#777777</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Prompt</string>\n                <key>scope</key>\n                <string>markup.prompt</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#777777</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Heading</string>\n                <key>scope</key>\n                <string>markup.heading</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#AA3731</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Strong</string>\n                <key>scope</key>\n                <string>markup.bold</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>bold</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Traceback</string>\n                <key>scope</key>\n                <string>markup.traceback</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#660000</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup: Underline</string>\n                <key>scope</key>\n                <string>markup.underline</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string>underline</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup Quote</string>\n                <key>scope</key>\n                <string>markup.quote</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#7A3E9D</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup Lists</string>\n                <key>scope</key>\n                <string>markup.list</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#4B83CD</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup Styling</string>\n                <key>scope</key>\n                <string>markup.bold, markup.italic</string>\n                <key>settings</key>\n                <dict>\n                    <key>foreground</key>\n                    <string>#448C27</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Markup Inline</string>\n                <key>scope</key>\n                <string>markup.inline.raw</string>\n                <key>settings</key>\n                <dict>\n                    <key>fontStyle</key>\n                    <string></string>\n                    <key>foreground</key>\n                    <string>#AB6526</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>-----------------------------------</string>\n                <key>settings</key>\n                <dict />\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Extra: Diff Range</string>\n                <key>scope</key>\n                <string>meta.diff.range, meta.diff.index, meta.separator</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#DDDDFF</string>\n                    <key>foreground</key>\n                    <string>#434343</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Extra: Diff From</string>\n                <key>scope</key>\n                <string>meta.diff.header.from-file</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#FFDDDD</string>\n                    <key>foreground</key>\n                    <string>#434343</string>\n                </dict>\n            </dict>\n            <dict>\n                <key>name</key>\n                <string>Extra: Diff To</string>\n                <key>scope</key>\n                <string>meta.diff.header.to-file</string>\n                <key>settings</key>\n                <dict>\n                    <key>background</key>\n                    <string>#DDFFDD</string>\n                    <key>foreground</key>\n                    <string>#434343</string>\n                </dict>\n            </dict>\n        </array>\n        <key>uuid</key>\n        <string>231D6A91-5FD1-4CBE-BD2A-0F36C08693F1</string>\n    </dict>\n</plist>\n"
  },
  {
    "path": "app/src/main/assets/textmate/xml/language-configuration.json",
    "content": "{\n  \"comments\": {\n    \"lineComment\": [\n      \"<!--\",\n      \"-->\"\n    ]\n  },\n  \"brackets\": [\n    [\n      \"<\",\n      \"/>\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"(\",\n      \")\"\n    ]\n  ],\n  \"autoClosingPairs\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"(\",\n      \")\"\n    ],\n    {\n      \"open\": \"\\\"\",\n      \"close\": \"\\\"\",\n      \"notIn\": [\n        \"string\"\n      ]\n    },\n    {\n      \"open\": \"'\",\n      \"close\": \"'\",\n      \"notIn\": [\n        \"string\"\n      ]\n    },\n    {\n      \"open\": \"/**\",\n      \"close\": \" */\",\n      \"notIn\": [\n        \"string\"\n      ]\n    }\n  ],\n  \"surroundingPairs\": [\n    [\n      \"{\",\n      \"}\"\n    ],\n    [\n      \"[\",\n      \"]\"\n    ],\n    [\n      \"(\",\n      \")\"\n    ],\n    [\n      \"\\\"\",\n      \"\\\"\"\n    ],\n    [\n      \"'\",\n      \"'\"\n    ],\n    [\n      \"<\",\n      \">\"\n    ]\n  ],\n  \"folding\": {\n    \"offSide\": false,\n    \"markers\": {\n      \"start\": \"^\\\\s*//\\\\s*#region\",\n      \"end\": \"^\\\\s*//\\\\s*#endregion\"\n    }\n  }\n}"
  },
  {
    "path": "app/src/main/assets/textmate/xml/syntax/xml.tmLanguage.json",
    "content": "{\n  \"scopeName\": \"text.xml\",\n  \"name\": \"XML\",\n  \"fileTypes\": [\n    \"aiml\",\n    \"atom\",\n    \"axml\",\n    \"bpmn\",\n    \"config\",\n    \"cpt\",\n    \"csl\",\n    \"csproj\",\n    \"csproj.user\",\n    \"dae\",\n    \"dia\",\n    \"dita\",\n    \"ditamap\",\n    \"dtml\",\n    \"fodg\",\n    \"fodp\",\n    \"fods\",\n    \"fodt\",\n    \"fsproj\",\n    \"fxml\",\n    \"gir\",\n    \"glade\",\n    \"gpx\",\n    \"graphml\",\n    \"icls\",\n    \"iml\",\n    \"isml\",\n    \"jmx\",\n    \"jsp\",\n    \"kml\",\n    \"kst\",\n    \"launch\",\n    \"menu\",\n    \"mxml\",\n    \"nunit\",\n    \"nuspec\",\n    \"opml\",\n    \"owl\",\n    \"pom\",\n    \"ppj\",\n    \"proj\",\n    \"pt\",\n    \"pubxml\",\n    \"pubxml.user\",\n    \"rdf\",\n    \"rng\",\n    \"rss\",\n    \"sdf\",\n    \"shproj\",\n    \"siml\",\n    \"sld\",\n    \"storyboard\",\n    \"StyleCop\",\n    \"svg\",\n    \"targets\",\n    \"tld\",\n    \"vbox\",\n    \"vbox-prev\",\n    \"vbproj\",\n    \"vbproj.user\",\n    \"vcproj\",\n    \"vcproj.filters\",\n    \"vcxproj\",\n    \"vcxproj.filters\",\n    \"wixmsp\",\n    \"wixmst\",\n    \"wixobj\",\n    \"wixout\",\n    \"wsdl\",\n    \"wxs\",\n    \"xaml\",\n    \"xbl\",\n    \"xib\",\n    \"xlf\",\n    \"xliff\",\n    \"xml\",\n    \"xpdl\",\n    \"xsd\",\n    \"xul\",\n    \"ui\"\n  ],\n  \"firstLineMatch\": \"(?x)\\n# XML declaration\\n(?:\\n  ^ <\\\\? xml\\n\\n  # VersionInfo\\n  \\\\s+ version\\n  \\\\s* = \\\\s*\\n  (['\\\"])\\n    1 \\\\. [0-9]+\\n  \\\\1\\n\\n  # EncodingDecl\\n  (?:\\n    \\\\s+ encoding\\n    \\\\s* = \\\\s*\\n\\n    # EncName\\n    (['\\\"])\\n      [A-Za-z]\\n      [-A-Za-z0-9._]*\\n    \\\\2\\n  )?\\n\\n  # SDDecl\\n  (?:\\n    \\\\s+ standalone\\n    \\\\s* = \\\\s*\\n    (['\\\"])\\n      (?:yes|no)\\n    \\\\3\\n  )?\\n\\n  \\\\s* \\\\?>\\n)\\n|\\n# Modeline\\n(?i:\\n  # Emacs\\n  -\\\\*-(?:\\\\s*(?=[^:;\\\\s]+\\\\s*-\\\\*-)|(?:.*?[;\\\\s]|(?<=-\\\\*-))mode\\\\s*:\\\\s*)\\n    xml\\n  (?=[\\\\s;]|(?<![-*])-\\\\*-).*?-\\\\*-\\n  |\\n  # Vim\\n  (?:(?:\\\\s|^)vi(?:m[<=>]?\\\\d+|m)?|\\\\sex)(?=:(?=\\\\s*set?\\\\s[^\\\\n:]+:)|:(?!\\\\s*set?\\\\s))(?:(?:\\\\s|\\\\s*:\\\\s*)\\\\w*(?:\\\\s*=(?:[^\\\\n\\\\\\\\\\\\s]|\\\\\\\\.)*)?)*[\\\\s:](?:filetype|ft|syntax)\\\\s*=\\n    xml\\n  (?=\\\\s|:|$)\\n)\",\n  \"patterns\": [\n    {\n      \"begin\": \"(<\\\\?)\\\\s*([-_a-zA-Z0-9]+)\",\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"entity.name.tag.xml\"\n        }\n      },\n      \"end\": \"(\\\\?>)\",\n      \"name\": \"meta.tag.preprocessor.xml\",\n      \"patterns\": [\n        {\n          \"match\": \" ([a-zA-Z-]+)\",\n          \"name\": \"entity.other.attribute-name.xml\"\n        },\n        {\n          \"include\": \"#doublequotedString\"\n        },\n        {\n          \"include\": \"#singlequotedString\"\n        }\n      ]\n    },\n    {\n      \"begin\": \"(<!)(DOCTYPE)\\\\s+([:a-zA-Z_][:a-zA-Z0-9_.-]*)\",\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"keyword.other.doctype.xml\"\n        },\n        \"3\": {\n          \"name\": \"variable.language.documentroot.xml\"\n        }\n      },\n      \"end\": \"\\\\s*(>)\",\n      \"name\": \"meta.tag.sgml.doctype.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#internalSubset\"\n        }\n      ]\n    },\n    {\n      \"include\": \"#comments\"\n    },\n    {\n      \"begin\": \"(<)((?:([-_a-zA-Z0-9]+)(:))?([-_a-zA-Z0-9:]+))(?=(\\\\s[^>]*)?></\\\\2>)\",\n      \"beginCaptures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"entity.name.tag.xml\"\n        },\n        \"3\": {\n          \"name\": \"entity.name.tag.namespace.xml\"\n        },\n        \"4\": {\n          \"name\": \"punctuation.separator.namespace.xml\"\n        },\n        \"5\": {\n          \"name\": \"entity.name.tag.localname.xml\"\n        }\n      },\n      \"end\": \"(>)(</)((?:([-_a-zA-Z0-9]+)(:))?([-_a-zA-Z0-9:]+))(>)\",\n      \"endCaptures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"3\": {\n          \"name\": \"entity.name.tag.xml\"\n        },\n        \"4\": {\n          \"name\": \"entity.name.tag.namespace.xml\"\n        },\n        \"5\": {\n          \"name\": \"punctuation.separator.namespace.xml\"\n        },\n        \"6\": {\n          \"name\": \"entity.name.tag.localname.xml\"\n        },\n        \"7\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        }\n      },\n      \"name\": \"meta.tag.no-content.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#tagStuff\"\n        }\n      ]\n    },\n    {\n      \"begin\": \"(</?)(?:([-\\\\w\\\\.]+)((:)))?([-\\\\w\\\\.:]+)\",\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"entity.name.tag.namespace.xml\"\n        },\n        \"3\": {\n          \"name\": \"entity.name.tag.xml\"\n        },\n        \"4\": {\n          \"name\": \"punctuation.separator.namespace.xml\"\n        },\n        \"5\": {\n          \"name\": \"entity.name.tag.localname.xml\"\n        }\n      },\n      \"end\": \"(/?>)\",\n      \"name\": \"meta.tag.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#tagStuff\"\n        }\n      ]\n    },\n    {\n      \"include\": \"#entity\"\n    },\n    {\n      \"include\": \"#bare-ampersand\"\n    },\n    {\n      \"begin\": \"<%@\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.section.embedded.begin.xml\"\n        }\n      },\n      \"end\": \"%>\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.section.embedded.end.xml\"\n        }\n      },\n      \"name\": \"source.java-props.embedded.xml\",\n      \"patterns\": [\n        {\n          \"match\": \"page|include|taglib\",\n          \"name\": \"keyword.other.page-props.xml\"\n        }\n      ]\n    },\n    {\n      \"begin\": \"<%[!=]?(?!--)\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.section.embedded.begin.xml\"\n        }\n      },\n      \"end\": \"(?!--)%>\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.section.embedded.end.xml\"\n        }\n      },\n      \"name\": \"source.java.embedded.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"source.java\"\n        }\n      ]\n    },\n    {\n      \"begin\": \"<!\\\\[CDATA\\\\[\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.begin.xml\"\n        }\n      },\n      \"end\": \"]]>\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.end.xml\"\n        }\n      },\n      \"name\": \"string.unquoted.cdata.xml\"\n    }\n  ],\n  \"repository\": {\n    \"EntityDecl\": {\n      \"begin\": \"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:a-zA-Z_][:a-zA-Z0-9_.-]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?\",\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.tag.xml\"\n        },\n        \"2\": {\n          \"name\": \"keyword.other.entity.xml\"\n        },\n        \"3\": {\n          \"name\": \"punctuation.definition.entity.xml\"\n        },\n        \"4\": {\n          \"name\": \"variable.language.entity.xml\"\n        },\n        \"5\": {\n          \"name\": \"keyword.other.entitytype.xml\"\n        }\n      },\n      \"end\": \"(>)\",\n      \"patterns\": [\n        {\n          \"include\": \"#doublequotedString\"\n        },\n        {\n          \"include\": \"#singlequotedString\"\n        }\n      ]\n    },\n    \"bare-ampersand\": {\n      \"match\": \"&\",\n      \"name\": \"invalid.illegal.bad-ampersand.xml\"\n    },\n    \"doublequotedString\": {\n      \"begin\": \"\\\"\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.begin.xml\"\n        }\n      },\n      \"end\": \"\\\"\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.end.xml\"\n        }\n      },\n      \"name\": \"string.quoted.double.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#entity\"\n        },\n        {\n          \"include\": \"#bare-ampersand\"\n        }\n      ]\n    },\n    \"entity\": {\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.constant.xml\"\n        },\n        \"3\": {\n          \"name\": \"punctuation.definition.constant.xml\"\n        }\n      },\n      \"match\": \"(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)\",\n      \"name\": \"constant.character.entity.xml\"\n    },\n    \"internalSubset\": {\n      \"begin\": \"(\\\\[)\",\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.constant.xml\"\n        }\n      },\n      \"end\": \"(\\\\])\",\n      \"name\": \"meta.internalsubset.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#EntityDecl\"\n        },\n        {\n          \"include\": \"#parameterEntity\"\n        },\n        {\n          \"include\": \"#comments\"\n        }\n      ]\n    },\n    \"parameterEntity\": {\n      \"captures\": {\n        \"1\": {\n          \"name\": \"punctuation.definition.constant.xml\"\n        },\n        \"3\": {\n          \"name\": \"punctuation.definition.constant.xml\"\n        }\n      },\n      \"match\": \"(%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;)\",\n      \"name\": \"constant.character.parameter-entity.xml\"\n    },\n    \"singlequotedString\": {\n      \"begin\": \"'\",\n      \"beginCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.begin.xml\"\n        }\n      },\n      \"end\": \"'\",\n      \"endCaptures\": {\n        \"0\": {\n          \"name\": \"punctuation.definition.string.end.xml\"\n        }\n      },\n      \"name\": \"string.quoted.single.xml\",\n      \"patterns\": [\n        {\n          \"include\": \"#entity\"\n        },\n        {\n          \"include\": \"#bare-ampersand\"\n        }\n      ]\n    },\n    \"tagStuff\": {\n      \"patterns\": [\n        {\n          \"captures\": {\n            \"1\": {\n              \"name\": \"entity.other.attribute-name.namespace.xml\"\n            },\n            \"2\": {\n              \"name\": \"entity.other.attribute-name.xml\"\n            },\n            \"3\": {\n              \"name\": \"punctuation.separator.namespace.xml\"\n            },\n            \"4\": {\n              \"name\": \"entity.other.attribute-name.localname.xml\"\n            }\n          },\n          \"match\": \"(?:^|\\\\s+)(?:([-\\\\w.]+)((:)))?([-\\\\w.:]+)\\\\s*=\"\n        },\n        {\n          \"include\": \"#doublequotedString\"\n        },\n        {\n          \"include\": \"#singlequotedString\"\n        }\n      ]\n    }\n  }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/App.kt",
    "content": "package com.raival.fileexplorer\n\nimport android.app.Application\nimport android.content.ClipData\nimport android.content.ClipboardManager\nimport android.content.Context\nimport android.os.Process\nimport android.widget.Toast\nimport com.pixplicity.easyprefs.library.Prefs\nimport com.raival.fileexplorer.util.Log\nimport kotlin.system.exitProcess\n\nclass App : Application() {\n    override fun onCreate() {\n        Thread.setDefaultUncaughtExceptionHandler { _: Thread?, throwable: Throwable? ->\n            Log.e(\"AppCrash\", \"\", throwable)\n            Process.killProcess(Process.myPid())\n            exitProcess(2)\n        }\n\n        super.onCreate()\n        appContext = this\n\n        Prefs.Builder()\n            .setContext(applicationContext)\n            .setPrefsName(\"Prefs\")\n            .setMode(MODE_PRIVATE)\n            .build()\n        Log.start(appContext)\n    }\n\n    companion object {\n        lateinit var appContext: Context\n\n        @JvmStatic\n        fun showMsg(message: String?) {\n            Toast.makeText(appContext, message, Toast.LENGTH_SHORT).show()\n        }\n\n        @JvmStatic\n        fun copyString(string: String?) {\n            (appContext.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager).setPrimaryClip(\n                ClipData.newPlainText(\"clipboard\", string)\n            )\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/BaseActivity.kt",
    "content": "package com.raival.fileexplorer.activity\n\nimport android.Manifest\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.net.Uri\nimport android.os.Build\nimport android.os.Bundle\nimport android.os.Environment\nimport android.provider.Settings\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport com.bumptech.glide.Glide\nimport com.google.android.material.elevation.SurfaceColors\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.util.PrefsUtils\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\n\nabstract class BaseActivity : AppCompatActivity() {\n    @JvmField\n    protected var currentTheme: String = PrefsUtils.Settings.themeMode\n\n    /**\n     * This method is called after checking storage permissions\n     */\n    open fun init() {}\n    override fun onCreate(savedInstanceState: Bundle?) {\n        if (currentTheme == SettingsActivity.THEME_MODE_DARK) {\n            setTheme(R.style.Theme_FileExplorer_Dark)\n        } else if (currentTheme == SettingsActivity.THEME_MODE_LIGHT) {\n            setTheme(R.style.Theme_FileExplorer_Light)\n        }\n        super.onCreate(savedInstanceState)\n        window.statusBarColor = SurfaceColors.SURFACE_2.getColor(this)\n    }\n\n    protected fun checkPermissions() {\n        if (grantStoragePermissions()) {\n            init()\n        }\n    }\n\n    private fun grantStoragePermissions(): Boolean {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n            if (!Environment.isExternalStorageManager()) {\n                val intent = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)\n                intent.data = Uri.fromParts(\"package\", packageName, null)\n                startActivityForResult(intent, 121121)\n                return false\n            }\n        } else {\n            if (ContextCompat.checkSelfPermission(\n                    this,\n                    Manifest.permission.READ_EXTERNAL_STORAGE\n                ) == PackageManager.PERMISSION_DENIED\n                || ContextCompat.checkSelfPermission(\n                    this,\n                    Manifest.permission.WRITE_EXTERNAL_STORAGE\n                ) == PackageManager.PERMISSION_DENIED\n            ) {\n                ActivityCompat.requestPermissions(\n                    this,\n                    arrayOf(\n                        Manifest.permission.READ_EXTERNAL_STORAGE,\n                        Manifest.permission.WRITE_EXTERNAL_STORAGE\n                    ),\n                    9011\n                )\n                return false\n            }\n        }\n        return true\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array<String>,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n        if (requestCode == 9011) {\n            init()\n        }\n    }\n\n    override fun onDestroy() {\n        super.onDestroy()\n        CoroutineScope(Dispatchers.Default).launch {\n            Glide.get(App.appContext).clearDiskCache()\n        }\n    }\n\n    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n        super.onActivityResult(requestCode, resultCode, data)\n        if (requestCode == 121121) {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n                if (Environment.isExternalStorageManager()) {\n                    init()\n                } else {\n                    showMsg(\"Storage permission is required\")\n                    finish()\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/MainActivity.kt",
    "content": "package com.raival.fileexplorer.activity\n\nimport android.annotation.SuppressLint\nimport android.content.Intent\nimport android.net.Uri\nimport android.os.Bundle\nimport android.os.Environment\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.HorizontalScrollView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.appcompat.app.ActionBarDrawerToggle\nimport androidx.appcompat.view.menu.MenuBuilder\nimport androidx.appcompat.widget.PopupMenu\nimport androidx.drawerlayout.widget.DrawerLayout\nimport androidx.fragment.app.FragmentContainerView\nimport androidx.lifecycle.ViewModelProvider\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.appbar.MaterialToolbar\nimport com.google.android.material.chip.Chip\nimport com.google.android.material.chip.ChipGroup\nimport com.google.android.material.progressindicator.LinearProgressIndicator\nimport com.google.android.material.textview.MaterialTextView\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.adapter.BookmarksAdapter\nimport com.raival.fileexplorer.activity.model.MainViewModel\nimport com.raival.fileexplorer.common.dialog.CustomDialog\nimport com.raival.fileexplorer.common.view.BottomBarView\nimport com.raival.fileexplorer.common.view.TabView\nimport com.raival.fileexplorer.common.view.TabView.OnUpdateTabViewListener\nimport com.raival.fileexplorer.extension.*\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.BaseTabFragment\nimport com.raival.fileexplorer.tab.apps.AppsTabDataHolder\nimport com.raival.fileexplorer.tab.apps.AppsTabFragment\nimport com.raival.fileexplorer.tab.file.FileExplorerTabDataHolder\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.misc.FileOpener\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.util.Log\nimport com.raival.fileexplorer.util.PrefsUtils\nimport com.raival.fileexplorer.util.Utils\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass MainActivity : BaseActivity() {\n    private var confirmExit = false\n\n    lateinit var tabView: TabView\n    lateinit var toolbar: MaterialToolbar\n    lateinit var bottomBarView: BottomBarView\n\n    private lateinit var drawerLayout: View\n    private lateinit var drawer: DrawerLayout\n    private lateinit var drawerStorageSpaceProgress: LinearProgressIndicator\n    private lateinit var drawerStorageSpace: TextView\n    private lateinit var drawerRootSpaceProgress: LinearProgressIndicator\n    private lateinit var drawerRootSpace: TextView\n    private lateinit var bookmarksList: RecyclerView\n    private lateinit var fragmentContainerView: FragmentContainerView\n\n    private val mainViewModel: MainViewModel\n        get() {\n            return ViewModelProvider(this)[MainViewModel::class.java]\n        }\n\n    private val tabFragments: List<BaseTabFragment>\n        get() {\n            val list: MutableList<BaseTabFragment> = ArrayList()\n            for (fragment in supportFragmentManager.fragments) {\n                if (fragment is BaseTabFragment) {\n                    list.add(fragment)\n                }\n            }\n            return list\n        }\n\n    private val activeFragment: BaseTabFragment\n        get() = supportFragmentManager.findFragmentById(R.id.fragment_container) as BaseTabFragment\n\n    /**\n     * Called after read & write permissions are granted\n     */\n    override fun init() {\n        if (tabFragments.isEmpty()) {\n            loadDefaultTab()\n        } else {\n            fragmentContainerView.post { restoreTabs() }\n        }\n    }\n\n    private fun restoreTabs() {\n        val activeFragmentTag = activeFragment.tag\n        for (i in mainViewModel.getDataHolders().indices) {\n            val dataHolder = mainViewModel.getDataHolders()[i]\n            // The active fragment will create its own TabView, so we skip it\n            if (dataHolder.tag != activeFragmentTag) {\n                when (dataHolder) {\n                    is FileExplorerTabDataHolder -> {\n                        tabView.insertNewTabAt(i, dataHolder.tag, false).setName(\n                            dataHolder.activeDirectory!!.getShortLabel(\n                                FileExplorerTabFragment.MAX_NAME_LENGTH\n                            )\n                        )\n                    }\n                    is AppsTabDataHolder -> {\n                        tabView.insertNewTabAt(i, dataHolder.tag, false).setName(\"Apps\")\n                    }\n                    // handle other types of DataHolders here\n                }\n            }\n        }\n    }\n\n    /**\n     * The default fragment cannot be deleted, and its tag is unique (starts with \"0_\")\n     */\n    private fun loadDefaultTab() {\n        supportFragmentManager.beginTransaction()\n            .replace(\n                R.id.fragment_container,\n                FileExplorerTabFragment(),\n                BaseTabFragment.DEFAULT_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            .setReorderingAllowed(true)\n            .commit()\n    }\n\n    fun generateRandomTag(): String {\n        return Utils.getRandomString(16)\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        tabView = findViewById(R.id.tabs)\n        fragmentContainerView = findViewById(R.id.fragment_container)\n        toolbar = findViewById(R.id.toolbar)\n        bottomBarView = findViewById(R.id.bottom_bar_view)\n        drawer = findViewById(R.id.drawer)\n\n        setSupportActionBar(toolbar)\n        supportActionBar?.setDisplayHomeAsUpEnabled(true)\n        supportActionBar!!.setHomeButtonEnabled(true)\n        supportActionBar!!.setHomeAsUpIndicator(R.drawable.ic_round_menu_24)\n        toolbar.setNavigationOnClickListener(null)\n\n        val toggle: ActionBarDrawerToggle = object :\n            ActionBarDrawerToggle(this, drawer, toolbar, R.string.app_name, R.string.app_name) {\n            override fun onDrawerOpened(drawerView: View) {\n                super.onDrawerOpened(drawerView)\n                refreshBookmarks()\n            }\n        }\n\n        drawer.addDrawerListener(toggle)\n        toggle.syncState()\n\n        tabView.setOnUpdateTabViewListener(object : OnUpdateTabViewListener {\n            override fun onUpdate(tab: TabView.Tab?, event: Int) {\n                if (tab == null) return\n                if (event == TabView.ON_SELECT) {\n                    if (tab.tag.startsWith(BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX)\n                        || tab.tag.startsWith(BaseTabFragment.DEFAULT_TAB_FRAGMENT_PREFIX)\n                    ) {\n                        if (supportFragmentManager.findFragmentById(R.id.fragment_container)?.tag != tab.tag) {\n                            supportFragmentManager.beginTransaction()\n                                .replace(\n                                    R.id.fragment_container,\n                                    FileExplorerTabFragment(),\n                                    tab.tag\n                                )\n                                .setReorderingAllowed(true)\n                                .commit()\n                        }\n                    }\n                    if (tab.tag.startsWith(BaseTabFragment.APPS_TAB_FRAGMENT_PREFIX)) {\n                        if (supportFragmentManager.findFragmentById(R.id.fragment_container)?.tag != tab.tag) {\n                            supportFragmentManager.beginTransaction()\n                                .replace(R.id.fragment_container, AppsTabFragment(), tab.tag)\n                                .setReorderingAllowed(true)\n                                .commit()\n                        }\n                    }\n                    // Handle other types of tabs here...\n                } else if (event == TabView.ON_LONG_CLICK) {\n                    val popupMenu = PopupMenu(this@MainActivity, tab.view)\n                    popupMenu.inflate(R.menu.tab_menu)\n                    // Default tab is un-closable\n                    if (tab.tag.startsWith(BaseTabFragment.DEFAULT_TAB_FRAGMENT_PREFIX)) {\n                        popupMenu.menu.findItem(R.id.close).isVisible = false\n                        popupMenu.menu.findItem(R.id.close_all).isVisible = false\n                    }\n                    popupMenu.setOnMenuItemClickListener { item: MenuItem ->\n                        when (item.itemId) {\n                            R.id.close -> {\n                                val activeFragment = activeFragment\n                                if (tab.tag == activeFragment.tag) {\n                                    activeFragment.closeTab()\n                                } else {\n                                    mainViewModel.getDataHolders()\n                                        .removeIf { dataHolder1: BaseDataHolder -> dataHolder1.tag == tab.tag }\n                                    closeTab(tab.tag)\n                                }\n                                return@setOnMenuItemClickListener true\n                            }\n                            R.id.close_all -> {\n                                val activeFragment = activeFragment\n                                // Remove unselected tabs\n                                for (tag in tabView.tags) {\n                                    if (!tag.startsWith(BaseTabFragment.DEFAULT_TAB_FRAGMENT_PREFIX) && tag != activeFragment.tag) {\n                                        mainViewModel.getDataHolders()\n                                            .removeIf { dataHolder1: BaseDataHolder -> dataHolder1.tag == tag }\n                                        closeTab(tag)\n                                    }\n                                }\n                                // Remove the active tab\n                                activeFragment.closeTab()\n                                return@setOnMenuItemClickListener true\n                            }\n                            R.id.close_others -> {\n                                val activeFragment = activeFragment\n                                for (tag in tabView.tags) {\n                                    if (!tag.startsWith(BaseTabFragment.DEFAULT_TAB_FRAGMENT_PREFIX) && tag != activeFragment.tag && tag != tab.tag) {\n                                        mainViewModel.getDataHolders()\n                                            .removeIf { dataHolder1: BaseDataHolder -> dataHolder1.tag == tag }\n                                        closeTab(tag)\n                                    }\n                                }\n                                if (activeFragment.tag != tab.tag) activeFragment.closeTab()\n                                return@setOnMenuItemClickListener true\n                            }\n                            else -> false\n                        }\n                    }\n                    popupMenu.show()\n                }\n            }\n        })\n\n        findViewById<View>(R.id.tabs_options).setOnClickListener {\n            addNewTab()\n        }\n\n        checkPermissions()\n        setupDrawer()\n    }\n\n    override fun onResume() {\n        super.onResume()\n        val newTheme = PrefsUtils.Settings.themeMode\n        if (newTheme != currentTheme) {\n            recreate()\n        } else {\n            bottomBarView.onUpdatePrefs()\n        }\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    fun refreshBookmarks() {\n        bookmarksList.adapter?.notifyDataSetChanged()\n    }\n\n    fun onBookmarkSelected(file: File) {\n        if (file.isDirectory) {\n            val fragment = FileExplorerTabFragment(file)\n            addNewTab(\n                fragment,\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n        } else {\n            FileOpener(this).openFile(file)\n        }\n        if (drawer.isDrawerOpen(drawerLayout)) drawer.close()\n    }\n\n    private fun setupDrawer() {\n        drawerLayout = findViewById(R.id.drawer_layout)\n        drawerStorageSpaceProgress = drawerLayout.findViewById(R.id.storage_space_progress)\n        drawerRootSpaceProgress = drawerLayout.findViewById(R.id.root_space_progress)\n        drawerRootSpace = drawerLayout.findViewById(R.id.root_space)\n        drawerStorageSpace = drawerLayout.findViewById(R.id.storage_space)\n        bookmarksList = drawerLayout.findViewById(R.id.rv)\n\n        drawerLayout.findViewById<View>(R.id.apps).setOnClickListener {\n            addNewTab(\n                AppsTabFragment(),\n                BaseTabFragment.APPS_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            drawer.close()\n        }\n\n        bookmarksList.adapter = BookmarksAdapter(this)\n\n        drawerLayout.findViewById<MaterialToolbar>(R.id.toolbar).apply {\n            setTitle(R.string.app_name)\n            subtitle = LINK\n            menu.apply {\n                clear()\n                add(\"GitHub\")\n                    .setOnMenuItemClickListener { openGithubPage() }\n                    .setIcon(R.drawable.ic_baseline_open_in_browser_24)\n                    .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)\n                add(\"Settings\")\n                    .setOnMenuItemClickListener { openSettings() }\n                    .setIcon(R.drawable.ic_round_settings_24)\n                    .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)\n            }\n        }\n\n        updateStorageSpace()\n        updateRootSpace()\n    }\n\n    private fun openSettings(): Boolean {\n        startActivity(Intent().setClass(this, SettingsActivity::class.java))\n        return true\n    }\n\n    private fun openGithubPage(): Boolean {\n        startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(LINK)))\n        return true\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun updateRootSpace() {\n        val used = Environment.getRootDirectory().getUsedMemoryBytes()\n        val total = Environment.getRootDirectory().getTotalMemoryBytes()\n        val available = Environment.getRootDirectory().getAvailableMemoryBytes()\n\n        drawerRootSpaceProgress.progress = (used.toDouble() / total.toDouble() * 100).toInt()\n        drawerRootSpace.text = (FileUtils.getFormattedSize(used)\n                + \" used, \"\n                + FileUtils.getFormattedSize(available)\n                + \" available\")\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun updateStorageSpace() {\n        val used = Environment.getExternalStorageDirectory().getUsedMemoryBytes()\n        val total = Environment.getExternalStorageDirectory().getTotalMemoryBytes()\n        val available = Environment.getExternalStorageDirectory().getAvailableMemoryBytes()\n\n        drawerStorageSpaceProgress.progress = (used.toDouble() / total.toDouble() * 100).toInt()\n        drawerStorageSpace.text = (FileUtils.getFormattedSize(used)\n                + \" used, \"\n                + FileUtils.getFormattedSize(available)\n                + \" available\")\n    }\n\n    fun addNewTab(fragment: BaseTabFragment, tag: String) {\n        supportFragmentManager.beginTransaction()\n            .replace(R.id.fragment_container, fragment, tag)\n            .setReorderingAllowed(true)\n            .commit()\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun addNewTab() {\n        val customDialog = CustomDialog()\n        val input = customDialog.createInput(this, \"e.g. /sdcard/...\")\n        input.editText?.setSingleLine()\n        val textView = MaterialTextView(this)\n        textView.setPadding(0, 8.toDp(), 0, 0)\n        textView.alpha = 0.7f\n        textView.text = \"Quick Links:\"\n        val layout = ChipGroup(this).apply {\n            isScrollContainer = true\n        }\n\n        // Chips\n        layout.addView(createChip(\"Internal Storage\") {\n            addNewTab(\n                FileExplorerTabFragment(),\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Downloads\") {\n            addNewTab(\n                FileExplorerTabFragment(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)),\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Documents\") {\n            addNewTab(\n                FileExplorerTabFragment(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)),\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"DCIM\") {\n            addNewTab(\n                FileExplorerTabFragment(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)),\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Music\") {\n            addNewTab(\n                FileExplorerTabFragment(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)),\n                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n            )\n            customDialog.dismiss()\n        })\n\n        customDialog.setTitle(\"Set tab path\")\n            .addView(input)\n            .addView(textView)\n            .addView(HorizontalScrollView(this).apply {\n                layoutParams = LinearLayout.LayoutParams(\n                    LinearLayout.LayoutParams.MATCH_PARENT,\n                    LinearLayout.LayoutParams.WRAP_CONTENT\n                )\n                addView(layout)\n            })\n            .setPositiveButton(\"Go\", {\n                val file = File(\n                    input.editText!!.text.toString()\n                )\n                if (file.exists()) {\n                    if (file.canRead()) {\n                        if (file.isFile) {\n                            FileOpener(this).openFile(file)\n                        } else {\n                            addNewTab(\n                                FileExplorerTabFragment(file),\n                                BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX + generateRandomTag()\n                            )\n                        }\n                    } else {\n                        showMsg(Log.UNABLE_TO + \" read the provided file\")\n                    }\n                } else {\n                    showMsg(\"The destination path doesn't exist!\")\n                }\n            }, true)\n            .show(supportFragmentManager, \"\")\n    }\n\n    private fun createChip(title: String, onClick: () -> Unit): View {\n        return Chip(this).apply {\n            layoutParams = LinearLayout.LayoutParams(\n                ViewGroup.LayoutParams.WRAP_CONTENT,\n                ViewGroup.LayoutParams.WRAP_CONTENT\n            )\n            text = title\n            setOnClickListener {\n                onClick.invoke()\n            }\n        }\n    }\n\n    @SuppressLint(\"RestrictedApi\")\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.main_menu, menu)\n        (menu as MenuBuilder).setOptionalIconsVisible(true)\n        return super.onCreateOptionsMenu(menu)\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        val title = item.title.toString()\n        if (title == \"Logs\") {\n            showLogFile()\n        }\n        return super.onOptionsItemSelected(item)\n    }\n\n    private fun showLogFile() {\n        val logFile = File(getExternalFilesDir(null)!!.absolutePath + \"/debug/log.txt\")\n        if (logFile.exists() && logFile.isFile) {\n            val intent = Intent()\n            intent.setClass(this, TextEditorActivity::class.java)\n            intent.putExtra(\"file\", logFile.absolutePath)\n            startActivity(intent)\n            return\n        }\n        showMsg(\"No logs found\")\n    }\n\n    override fun onBackPressed() {\n        if (drawer.isDrawerOpen(drawerLayout)) {\n            drawer.close()\n            return\n        }\n        if (activeFragment.onBackPressed()) {\n            return\n        }\n        if (!confirmExit) {\n            confirmExit = true\n            showMsg(\"Press again to exit\")\n            CoroutineScope(Dispatchers.Main).launch {\n                delay(2000)\n                confirmExit = false\n            }\n            return\n        }\n        super.onBackPressed()\n    }\n\n    fun closeTab(tag: String) {\n        // Remove the tab from TabView. TabView will select another tab which will replace the corresponding fragment.\n        // The DataHolder must be removed by the fragment itself, as deletion process differs for each tab.\n\n        // Default fragment (the one added when the app is opened) won't be closed.\n        if (tag.startsWith(\"0_\")) return\n        tabView.removeTab(tag)\n    }\n\n    companion object {\n        private const val LINK = \"https://github.com/Raival-e/File-Explorer\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/SettingsActivity.kt",
    "content": "package com.raival.fileexplorer.activity\n\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.TextView\nimport androidx.appcompat.widget.SwitchCompat\nimport com.google.android.material.appbar.MaterialToolbar\nimport com.google.android.material.slider.Slider\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.common.dialog.CustomDialog\nimport com.raival.fileexplorer.common.dialog.OptionsDialog\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.util.PrefsUtils\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\n\nclass SettingsActivity : BaseActivity() {\n    private lateinit var logModeValue: TextView\n    private lateinit var themeModeValue: TextView\n    private lateinit var deepSearchSizeLimitValue: TextView\n    private lateinit var showBottomToolbarLabels: SwitchCompat\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.settings_activity)\n\n        val materialToolbar = findViewById<MaterialToolbar>(R.id.toolbar)\n        setSupportActionBar(materialToolbar)\n        supportActionBar?.title = \"Settings\"\n        supportActionBar!!.setDisplayHomeAsUpEnabled(true)\n        supportActionBar!!.setHomeButtonEnabled(true)\n        materialToolbar.setNavigationOnClickListener { onBackPressed() }\n\n        themeModeValue = findViewById(R.id.settings_theme_value)\n        themeModeValue.text = PrefsUtils.Settings.themeMode\n\n        findViewById<View>(R.id.settings_theme).setOnClickListener {\n            OptionsDialog(\"Select theme mode\")\n                .addOption(\n                    label = THEME_MODE_AUTO,\n                    listener = { setThemeMode(THEME_MODE_AUTO) },\n                    dismissOnClick = true\n                )\n                .addOption(\n                    label = THEME_MODE_DARK,\n                    listener = { setThemeMode(THEME_MODE_DARK) },\n                    dismissOnClick = true\n                )\n                .addOption(\n                    label = THEME_MODE_LIGHT,\n                    listener = { setThemeMode(THEME_MODE_LIGHT) },\n                    dismissOnClick = true\n                )\n                .show(supportFragmentManager, \"\")\n        }\n\n        showBottomToolbarLabels = findViewById(R.id.settings_bottom_toolbar_labels_value)\n        showBottomToolbarLabels.isChecked = PrefsUtils.Settings.showBottomToolbarLabels\n        findViewById<View>(R.id.settings_bottom_toolbar_labels).setOnClickListener {\n            showBottomToolbarLabels.isChecked = !showBottomToolbarLabels.isChecked\n            PrefsUtils.Settings.showBottomToolbarLabels = showBottomToolbarLabels.isChecked\n        }\n\n        logModeValue = findViewById(R.id.settings_log_mode_value)\n        logModeValue.text = PrefsUtils.Settings.logMode\n        findViewById<View>(R.id.settings_log_mode).setOnClickListener {\n            OptionsDialog(\"Select log mode\")\n                .addOption(LOG_MODE_DISABLE, { setLogMode(LOG_MODE_DISABLE) }, true)\n                .addOption(\n                    LOG_MODE_ERRORS_ONLY,\n                    { setLogMode(LOG_MODE_ERRORS_ONLY) },\n                    true\n                )\n                .addOption(LOG_MODE_ALL, { setLogMode(LOG_MODE_ALL) }, true)\n                .show(supportFragmentManager, \"\")\n        }\n\n        deepSearchSizeLimitValue = findViewById(R.id.settings_deep_search_limit_value)\n        deepSearchSizeLimitValue.text = FileUtils.getFormattedSize(\n            PrefsUtils.Settings.deepSearchFileSizeLimit,\n            \"%.0f\"\n        )\n        findViewById<View>(R.id.settings_deep_search_limit).setOnClickListener {\n            val seekBar = Slider(this).apply {\n                valueFrom = 0f\n                valueTo = 80f\n                stepSize = 1f\n                value = PrefsUtils.Settings.deepSearchFileSizeLimit.toFloat() / 1024 / 1024\n            }\n\n            val customDialog = CustomDialog()\n            customDialog.setTitle(\"Max file size limit (MB)\")\n                .setMsg(\n                    \"Any file larger than \"\n                            + FileUtils.getFormattedSize(PrefsUtils.Settings.deepSearchFileSizeLimit)\n                            + \" will be ignored\"\n                )\n                .addView(seekBar)\n                .setPositiveButton(\"Save\", {\n                    PrefsUtils.Settings.deepSearchFileSizeLimit =\n                        seekBar.value.toLong() * 1024 * 1024\n                    deepSearchSizeLimitValue.text = FileUtils.getFormattedSize(\n                        PrefsUtils.Settings.deepSearchFileSizeLimit,\n                        \"%.0f\"\n                    )\n                }, true)\n                .setNegativeButton(\"Cancel\", null, true)\n                .show(supportFragmentManager, \"\")\n\n            seekBar.addOnChangeListener(Slider.OnChangeListener { _: Slider?, value: Float, _: Boolean ->\n                customDialog.setMsg(\n                    \"Any file larger than \"\n                            + FileUtils.getFormattedSize((value * 1024 * 1024).toLong(), \"%.0f\")\n                            + \" will be ignored\"\n                )\n            })\n        }\n    }\n\n    private fun setLogMode(mode: String) {\n        logModeValue.text = mode\n        PrefsUtils.Settings.logMode = mode\n    }\n\n    private fun setThemeMode(mode: String) {\n        themeModeValue.text = mode\n        PrefsUtils.Settings.themeMode = mode\n        CoroutineScope(Dispatchers.Main).launch {\n            delay(150)\n            recreate()\n        }\n    }\n\n    companion object {\n        const val LOG_MODE_DISABLE = \"Disable\"\n        const val LOG_MODE_ERRORS_ONLY = \"Errors only\"\n        const val LOG_MODE_ALL = \"All logs\"\n        const val THEME_MODE_AUTO = \"Auto\"\n        const val THEME_MODE_DARK = \"Dark\"\n        const val THEME_MODE_LIGHT = \"Light\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/TextEditorActivity.kt",
    "content": "package com.raival.fileexplorer.activity\n\nimport android.annotation.SuppressLint\nimport android.graphics.Color\nimport android.graphics.Typeface\nimport android.os.Bundle\nimport android.text.Editable\nimport android.text.TextWatcher\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport androidx.appcompat.view.menu.MenuBuilder\nimport androidx.appcompat.widget.Toolbar\nimport androidx.lifecycle.ViewModelProvider\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.google.android.material.elevation.SurfaceColors\nimport com.google.android.material.textfield.TextInputLayout\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.editor.autocomplete.CustomCompletionItemAdapter\nimport com.raival.fileexplorer.activity.editor.autocomplete.CustomCompletionLayout\nimport com.raival.fileexplorer.activity.editor.language.java.JavaCodeLanguage\nimport com.raival.fileexplorer.activity.editor.language.json.JsonLanguage\nimport com.raival.fileexplorer.activity.editor.language.kotlin.KotlinCodeLanguage\nimport com.raival.fileexplorer.activity.editor.language.xml.XmlLanguage\nimport com.raival.fileexplorer.activity.editor.scheme.DarkScheme\nimport com.raival.fileexplorer.activity.editor.scheme.LightScheme\nimport com.raival.fileexplorer.activity.editor.view.SymbolInputView\nimport com.raival.fileexplorer.activity.model.TextEditorViewModel\nimport com.raival.fileexplorer.tab.file.misc.FileMimeTypes\nimport com.raival.fileexplorer.util.Log\nimport com.raival.fileexplorer.util.PrefsUtils\nimport com.raival.fileexplorer.util.Utils\nimport io.github.rosemoe.sora.lang.EmptyLanguage\nimport io.github.rosemoe.sora.lang.Language\nimport io.github.rosemoe.sora.langs.textmate.TextMateColorScheme\nimport io.github.rosemoe.sora.widget.CodeEditor\nimport io.github.rosemoe.sora.widget.EditorSearcher.SearchOptions\nimport io.github.rosemoe.sora.widget.component.EditorAutoCompletion\nimport io.github.rosemoe.sora.widget.component.Magnifier\nimport io.github.rosemoe.sora.widget.schemes.EditorColorScheme\nimport org.eclipse.tm4e.core.registry.IThemeSource\nimport java.io.File\nimport java.io.IOException\nimport java.util.*\n\nclass TextEditorActivity : BaseActivity() {\n    private lateinit var editor: CodeEditor\n    private lateinit var searchPanel: View\n    private lateinit var editorViewModel: TextEditorViewModel\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.text_editor_activity)\n\n        editorViewModel = ViewModelProvider(this).get(TextEditorViewModel::class.java)\n        editor = findViewById(R.id.editor)\n        val materialToolbar = findViewById<Toolbar>(R.id.toolbar)\n        searchPanel = findViewById(R.id.search_panel)\n\n        setupSearchPanel()\n\n        val inputView = findViewById<SymbolInputView>(R.id.symbol_input)\n        inputView.bindEditor(editor)\n            .setTextColor(Utils.getColorAttribute(R.attr.colorOnSurface, this))\n            .setBackgroundColor(SurfaceColors.SURFACE_2.getColor(this))\n        inputView.addSymbol(\"->\", \"    \")\n            .addSymbols(arrayOf(\"_\", \"=\", \"{\", \"}\", \"<\", \">\", \"|\", \"\\\\\", \"?\", \"+\", \"-\", \"*\", \"/\"))\n\n        editor.apply {\n            getComponent(EditorAutoCompletion::class.java).setLayout(CustomCompletionLayout())\n            getComponent(EditorAutoCompletion::class.java)\n                .setAdapter(CustomCompletionItemAdapter())\n            typefaceText = Typeface.createFromAsset(assets, \"font/JetBrainsMono-Regular.ttf\")\n            props.useICULibToSelectWords = false\n            props.symbolPairAutoCompletion = false\n            props.deleteMultiSpaces = -1\n            props.deleteEmptyLineFast = false\n\n        }\n\n        loadEditorPrefs()\n\n        if (editorViewModel.file == null) editorViewModel.file =\n            File(intent.getStringExtra(\"file\")!!)\n        detectLanguage(editorViewModel.file!!)\n\n        materialToolbar.title = editorViewModel.file!!.name\n        setSupportActionBar(materialToolbar)\n        supportActionBar?.apply {\n            setDisplayHomeAsUpEnabled(true)\n            setHomeButtonEnabled(true)\n        }\n        materialToolbar.setNavigationOnClickListener { onBackPressed() }\n\n        if (!editorViewModel.file!!.exists()) {\n            showMsg(\"File not found\")\n            finish()\n        }\n\n        if (editorViewModel.file!!.isDirectory) {\n            showMsg(\"Invalid file\")\n            finish()\n        }\n\n        try {\n            if (editorViewModel.content != null) {\n                editor.setText(editorViewModel.content.toString())\n            } else {\n                editor.setText(editorViewModel.file?.readText())\n            }\n        } catch (exception: Exception) {\n            Log.e(\n                TAG,\n                Log.SOMETHING_WENT_WRONG + \" while reading file: \" + editorViewModel.file!!.absolutePath,\n                exception\n            )\n            showMsg(\"Failed to read file: \" + editorViewModel.file!!.absolutePath)\n            finish()\n        }\n    }\n\n    private fun detectLanguage(file: File) {\n        when (file.extension.lowercase(Locale.getDefault())) {\n            FileMimeTypes.javaType -> setEditorLanguage(LANGUAGE_JAVA)\n            FileMimeTypes.kotlinType -> setEditorLanguage(LANGUAGE_KOTLIN)\n            \"json\" -> setEditorLanguage(LANGUAGE_JSON)\n            \"xml\" -> setEditorLanguage(LANGUAGE_XML)\n            else -> setEditorLanguage(-1)\n        }\n    }\n\n    private fun setupSearchPanel() {\n        val findInput = searchPanel.findViewById<TextInputLayout>(R.id.find_input)\n        findInput.hint = \"Find text\"\n        val replaceInput = searchPanel.findViewById<TextInputLayout>(R.id.replace_input)\n        replaceInput.hint = \"Replacement\"\n\n        findInput.editText?.addTextChangedListener(object : TextWatcher {\n            override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}\n            override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}\n            override fun afterTextChanged(editable: Editable) {\n                if (editable.isNotEmpty()) {\n                    editor.searcher.search(\n                        editable.toString(),\n                        SearchOptions(false, false)\n                    )\n                } else {\n                    editor.searcher.stopSearch()\n                }\n            }\n        })\n        searchPanel.apply {\n            findViewById<View>(R.id.next)\n                .setOnClickListener { if (editor.searcher.hasQuery()) editor.searcher.gotoNext() }\n            findViewById<View>(R.id.previous)\n                .setOnClickListener { if (editor.searcher.hasQuery()) editor.searcher.gotoPrevious() }\n            findViewById<View>(R.id.replace).setOnClickListener {\n                if (editor.searcher.hasQuery()) editor.searcher.replaceThis(\n                    replaceInput.editText?.text.toString()\n                )\n            }\n            findViewById<View>(R.id.replace_all).setOnClickListener {\n                if (editor.searcher.hasQuery()) editor.searcher.replaceAll(\n                    replaceInput.editText?.text.toString()\n                )\n            }\n        }\n    }\n\n    public override fun onStop() {\n        super.onStop()\n        editorViewModel.content = editor.text\n    }\n\n    override fun onBackPressed() {\n        if (searchPanel.visibility == View.VISIBLE) {\n            searchPanel.visibility = View.GONE\n            editor.searcher.stopSearch()\n            return\n        }\n        try {\n            if (editorViewModel.file?.readText() != editor.text.toString()) {\n                MaterialAlertDialogBuilder(this)\n                    .setTitle(\"Save File\")\n                    .setMessage(\"Do you want to save this file before exit?\")\n                    .setPositiveButton(\"Yes\") { _, _ ->\n                        saveFile(editor.text.toString())\n                        finish()\n                    }\n                    .setNegativeButton(\"No\") { _, _ -> finish() }\n                    .show()\n                return\n            }\n        } catch (exception: Exception) {\n            Log.w(TAG, exception)\n        }\n        super.onBackPressed()\n    }\n\n    @SuppressLint(\"RestrictedApi\")\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.text_editor_menu, menu)\n        (menu as MenuBuilder).setOptionalIconsVisible(true)\n        menu.findItem(R.id.editor_option_wordwrap).isChecked =\n            PrefsUtils.TextEditor.textEditorWordwrap\n        menu.findItem(R.id.editor_option_magnifier).isChecked =\n            PrefsUtils.TextEditor.textEditorMagnifier\n        menu.findItem(R.id.editor_option_pin_line_number).isChecked =\n            PrefsUtils.TextEditor.textEditorPinLineNumber\n        menu.findItem(R.id.editor_option_line_number).isChecked =\n            PrefsUtils.TextEditor.textEditorShowLineNumber\n        menu.findItem(R.id.editor_option_read_only).isChecked =\n            PrefsUtils.TextEditor.textEditorReadOnly\n        menu.findItem(R.id.editor_option_autocomplete).isChecked =\n            PrefsUtils.TextEditor.textEditorAutocomplete\n        return super.onCreateOptionsMenu(menu)\n    }\n\n    private fun loadEditorPrefs() {\n        editor.setPinLineNumber(PrefsUtils.TextEditor.textEditorPinLineNumber)\n        editor.isWordwrap = PrefsUtils.TextEditor.textEditorWordwrap\n        editor.isLineNumberEnabled = PrefsUtils.TextEditor.textEditorShowLineNumber\n        editor.getComponent(Magnifier::class.java).isEnabled =\n            PrefsUtils.TextEditor.textEditorMagnifier\n        editor.isEditable = !PrefsUtils.TextEditor.textEditorReadOnly\n        editor.getComponent(EditorAutoCompletion::class.java).isEnabled =\n            PrefsUtils.TextEditor.textEditorAutocomplete\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        val id = item.itemId\n        if (id == R.id.editor_format) {\n            editor.formatCodeAsync()\n        } else if (id == R.id.editor_language_def) {\n            item.isChecked = true\n            editor.setEditorLanguage(null)\n        } else if (id == R.id.editor_language_java) {\n            item.isChecked = true\n            setEditorLanguage(LANGUAGE_JAVA)\n        } else if (id == R.id.editor_language_kotlin) {\n            item.isChecked = true\n            setEditorLanguage(LANGUAGE_KOTLIN)\n        } else if (id == R.id.editor_option_read_only) {\n            item.isChecked = !item.isChecked\n            PrefsUtils.TextEditor.textEditorReadOnly = item.isChecked\n            editor.isEditable = !item.isChecked\n        } else if (id == R.id.editor_option_search) {\n            if (searchPanel.visibility == View.GONE) {\n                searchPanel.visibility = View.VISIBLE\n            } else {\n                searchPanel.visibility = View.GONE\n                editor.searcher.stopSearch()\n            }\n        } else if (id == R.id.editor_option_save) {\n            saveFile(editor.text.toString())\n            showMsg(\"Saved successfully\")\n        } else if (id == R.id.editor_option_text_undo) {\n            editor.undo()\n        } else if (id == R.id.editor_option_text_redo) {\n            editor.redo()\n        } else if (id == R.id.editor_option_wordwrap) {\n            item.isChecked = !item.isChecked\n            PrefsUtils.TextEditor.textEditorWordwrap = item.isChecked\n            editor.isWordwrap = item.isChecked\n        } else if (id == R.id.editor_option_magnifier) {\n            item.isChecked = !item.isChecked\n            editor.getComponent(Magnifier::class.java).isEnabled =\n                item.isChecked\n            PrefsUtils.TextEditor.textEditorMagnifier = item.isChecked\n        } else if (id == R.id.editor_option_line_number) {\n            item.isChecked = !item.isChecked\n            PrefsUtils.TextEditor.textEditorShowLineNumber = item.isChecked\n            editor.isLineNumberEnabled = item.isChecked\n        } else if (id == R.id.editor_option_pin_line_number) {\n            item.isChecked = !item.isChecked\n            PrefsUtils.TextEditor.textEditorPinLineNumber = item.isChecked\n            editor.setPinLineNumber(item.isChecked)\n        } else if (id == R.id.editor_option_autocomplete) {\n            item.isChecked = !item.isChecked\n            PrefsUtils.TextEditor.textEditorAutocomplete = item.isChecked\n            editor.getComponent(EditorAutoCompletion::class.java).isEnabled = item.isChecked\n        }\n        return super.onOptionsItemSelected(item)\n    }\n\n    private fun setEditorLanguage(language: Int) {\n        when (language) {\n            LANGUAGE_JAVA -> {\n                editor.apply {\n                    colorScheme = getColorScheme(false)\n                    setEditorLanguage(javaLanguage)\n                }\n            }\n            LANGUAGE_KOTLIN -> {\n                editor.apply {\n                    colorScheme = getColorScheme(true)\n                    setEditorLanguage(kotlinLang)\n                }\n            }\n            LANGUAGE_XML -> {\n                editor.apply {\n                    colorScheme = getColorScheme(true)\n                    setEditorLanguage(xmlLang)\n                }\n            }\n            LANGUAGE_JSON -> {\n                editor.apply {\n                    colorScheme = getColorScheme(true)\n                    setEditorLanguage(jsonLang)\n                }\n            }\n            else -> {\n                editor.apply {\n                    colorScheme = getColorScheme(false)\n                    setEditorLanguage(EmptyLanguage())\n                }\n            }\n        }\n    }\n\n    private val javaLanguage: Language\n        get() = JavaCodeLanguage()\n\n    private val jsonLang: Language\n        get() = JsonLanguage((getColorScheme(true) as TextMateColorScheme).themeSource)\n    private val xmlLang: Language\n        get() = XmlLanguage((getColorScheme(true) as TextMateColorScheme).themeSource)\n    private val kotlinLang: Language\n        get() = KotlinCodeLanguage((getColorScheme(true) as TextMateColorScheme).themeSource)\n\n    private fun getColorScheme(isTextmate: Boolean): EditorColorScheme {\n        return if (Utils.isDarkMode) getDarkScheme(isTextmate) else getLightScheme(isTextmate)\n    }\n\n    private fun getLightScheme(isTextmate: Boolean): EditorColorScheme {\n        val scheme: EditorColorScheme = if (isTextmate) {\n            try {\n                TextMateColorScheme.create(\n                    IThemeSource.fromInputStream(\n                        assets.open(\"textmate/light.tmTheme\"),\n                        \"light.tmTheme\",\n                        null\n                    )\n                )\n            } catch (e: Exception) {\n                Log.e(\n                    TAG,\n                    Log.SOMETHING_WENT_WRONG + \" while creating light scheme for textmate language\",\n                    e\n                )\n                showMsg(Log.UNABLE_TO + \" load: textmate/light.tmTheme\")\n                LightScheme()\n            }\n        } else {\n            LightScheme()\n        }\n        scheme.apply {\n            setColor(\n                EditorColorScheme.WHOLE_BACKGROUND,\n                SurfaceColors.SURFACE_0.getColor(this@TextEditorActivity)\n            )\n            setColor(\n                EditorColorScheme.LINE_NUMBER_BACKGROUND,\n                SurfaceColors.SURFACE_0.getColor(this@TextEditorActivity)\n            )\n            setColor(\n                EditorColorScheme.COMPLETION_WND_BACKGROUND,\n                SurfaceColors.SURFACE_1.getColor(this@TextEditorActivity)\n            )\n            setColor(EditorColorScheme.HIGHLIGHTED_DELIMITERS_FOREGROUND, Color.RED)\n        }\n        return scheme\n    }\n\n    private fun getDarkScheme(isTextmate: Boolean): EditorColorScheme {\n        val scheme: EditorColorScheme = if (isTextmate) {\n            try {\n                TextMateColorScheme.create(\n                    IThemeSource.fromInputStream(\n                        assets.open(\"textmate/dark.json\"),\n                        \"dark.json\",\n                        null\n                    )\n                )\n            } catch (e: Exception) {\n                Log.e(\n                    TAG,\n                    Log.SOMETHING_WENT_WRONG + \" while creating dark scheme for textmate language\",\n                    e\n                )\n                showMsg(Log.UNABLE_TO + \" load: textmate/dark.json\")\n                DarkScheme()\n            }\n        } else {\n            DarkScheme()\n        }\n        scheme.apply {\n            setColor(\n                EditorColorScheme.WHOLE_BACKGROUND,\n                SurfaceColors.SURFACE_0.getColor(this@TextEditorActivity)\n            )\n            setColor(\n                EditorColorScheme.LINE_NUMBER_BACKGROUND,\n                SurfaceColors.SURFACE_0.getColor(this@TextEditorActivity)\n            )\n            setColor(\n                EditorColorScheme.COMPLETION_WND_BACKGROUND,\n                SurfaceColors.SURFACE_1.getColor(this@TextEditorActivity)\n            )\n            setColor(EditorColorScheme.HIGHLIGHTED_DELIMITERS_FOREGROUND, Color.RED)\n        }\n        return scheme\n    }\n\n    private fun saveFile(content: String) {\n        try {\n            editorViewModel.file?.writeText(content)\n        } catch (e: IOException) {\n            Log.e(TAG, Log.UNABLE_TO + \" write to file \" + editorViewModel.file, e)\n            showMsg(Log.SOMETHING_WENT_WRONG + \", check app debug for more details\")\n        }\n    }\n\n    companion object {\n        private const val TAG = \"TextEditorActivity\"\n        private const val LANGUAGE_JAVA = 0\n        private const val LANGUAGE_KOTLIN = 1\n        private const val LANGUAGE_JSON = 2\n        private const val LANGUAGE_XML = 3\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/adapter/BookmarksAdapter.kt",
    "content": "package com.raival.fileexplorer.activity.adapter\n\nimport android.annotation.SuppressLint\nimport android.graphics.Color\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.MainActivity\nimport com.raival.fileexplorer.tab.file.misc.IconHelper\nimport com.raival.fileexplorer.util.PrefsUtils\nimport com.raival.fileexplorer.util.Utils\nimport java.io.File\n\nclass BookmarksAdapter(private val activity: MainActivity) :\n    RecyclerView.Adapter<BookmarksAdapter.ViewHolder>() {\n    private var list = arrayListOf<String>()\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        @SuppressLint(\"InflateParams\") val v =\n            activity.layoutInflater.inflate(R.layout.activity_main_drawer_bookmark_item, null)\n        v.layoutParams = RecyclerView.LayoutParams(\n            ViewGroup.LayoutParams.MATCH_PARENT,\n            ViewGroup.LayoutParams.WRAP_CONTENT\n        )\n        return ViewHolder(v)\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        holder.bind()\n    }\n\n    override fun getItemCount(): Int {\n        return PrefsUtils.TextEditor.fileExplorerTabBookmarks.also { list = it }.size\n    }\n\n    inner class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {\n        var name: TextView\n        var details: TextView\n        var icon: ImageView\n        var background: View\n\n        init {\n            name = v.findViewById(R.id.name)\n            details = v.findViewById(R.id.details)\n            icon = v.findViewById(R.id.icon)\n            background = v.findViewById(R.id.background)\n        }\n\n        @SuppressLint(\"NotifyDataSetChanged\")\n        fun bind() {\n            val position = adapterPosition\n            val file = File(list[position])\n            if (file.isFile && file.name.endsWith(\".extension\")) {\n                name.text = file.name.substring(0, file.name.length - 10)\n            } else {\n                name.text = file.name\n            }\n            if (!file.exists()) {\n                name.setTextColor(Color.RED)\n                details.setTextColor(Color.RED)\n                background.setOnClickListener {\n                    showMsg(\"This file doesn't exist anymore\")\n                    list.remove(file.absolutePath)\n                    PrefsUtils.General.setFileExplorerTabBookmarks(list)\n                    list.clear()\n                    notifyDataSetChanged()\n                }\n            } else {\n                name.setTextColor(Utils.getColorAttribute(R.attr.colorOnSurface, activity))\n                details.setTextColor(Utils.getColorAttribute(R.attr.colorOnSurface, activity))\n                background.setOnClickListener { activity.onBookmarkSelected(file) }\n            }\n            details.text = file.absolutePath\n            IconHelper.setFileIcon(icon, file)\n            background.setOnLongClickListener {\n                list.remove(file.absolutePath)\n                PrefsUtils.General.setFileExplorerTabBookmarks(list)\n                list.clear()\n                notifyDataSetChanged()\n                true\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/autocomplete/CustomCompletionItemAdapter.kt",
    "content": "package com.raival.fileexplorer.activity.editor.autocomplete\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.TextView\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.toDp\nimport io.github.rosemoe.sora.widget.component.EditorCompletionAdapter\n\nclass CustomCompletionItemAdapter : EditorCompletionAdapter() {\n    override fun getItemHeight(): Int = 45.toDp()\n\n    public override fun getView(\n        pos: Int,\n        view: View?,\n        parent: ViewGroup,\n        isCurrentCursorPosition: Boolean\n    ): View {\n        val v: View = view ?: LayoutInflater.from(context)\n            .inflate(R.layout.text_editor_completion_item, parent, false)\n\n        val item = getItem(pos)\n        var tv = v.findViewById<TextView>(R.id.result_item_label)\n        val iv = v.findViewById<TextView>(R.id.result_item_image)\n\n        tv.text = item.label\n        tv = v.findViewById(R.id.result_item_desc)\n        tv.text = item.desc\n        v.tag = pos\n        iv.text = item.desc.subSequence(0, 1)\n\n        return v\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/autocomplete/CustomCompletionLayout.kt",
    "content": "package com.raival.fileexplorer.activity.editor.autocomplete\n\nimport android.content.Context\nimport android.graphics.drawable.GradientDrawable\nimport android.os.SystemClock\nimport android.view.MotionEvent\nimport android.view.View\nimport android.widget.*\nimport android.widget.AdapterView.OnItemClickListener\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.extension.toDp\nimport io.github.rosemoe.sora.widget.component.CompletionLayout\nimport io.github.rosemoe.sora.widget.component.EditorAutoCompletion\nimport io.github.rosemoe.sora.widget.schemes.EditorColorScheme\n\nclass CustomCompletionLayout : CompletionLayout {\n    private lateinit var mListView: ListView\n    private lateinit var mProgressBar: ProgressBar\n    private lateinit var mBackground: GradientDrawable\n    private lateinit var mEditorAutoCompletion: EditorAutoCompletion\n\n    override fun onApplyColorScheme(colorScheme: EditorColorScheme) {\n        mBackground.setStroke(\n            1,\n            colorScheme.getColor(EditorColorScheme.COMPLETION_WND_BACKGROUND)\n        )\n        mBackground.setColor(colorScheme.getColor(EditorColorScheme.COMPLETION_WND_BACKGROUND))\n    }\n\n    override fun setEditorCompletion(completion: EditorAutoCompletion) {\n        mEditorAutoCompletion = completion\n    }\n\n    override fun inflate(context: Context): View {\n        val layout = RelativeLayout(context)\n        mProgressBar = ProgressBar(context)\n        layout.addView(mProgressBar)\n\n        val params = mProgressBar.layoutParams as RelativeLayout.LayoutParams\n        params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT)\n        params.height = 30.toDp()\n        params.width = params.height\n\n        mBackground = GradientDrawable()\n        mBackground.cornerRadius = 8f.toDp()\n        layout.background = mBackground\n\n        mListView = ListView(context)\n        mListView.dividerHeight = 0\n        layout.addView(mListView, LinearLayout.LayoutParams(-1, -1))\n        mListView.onItemClickListener =\n            OnItemClickListener { _: AdapterView<*>?, _: View?, position: Int, _: Long ->\n                try {\n                    mEditorAutoCompletion.select(position)\n                } catch (e: Exception) {\n                    showMsg(e.toString())\n                }\n            }\n        setLoading(true)\n        return layout\n    }\n\n    override fun getCompletionList(): AdapterView<*> {\n        return mListView\n    }\n\n    override fun setLoading(loading: Boolean) {\n        mProgressBar.visibility = if (loading) View.VISIBLE else View.INVISIBLE\n    }\n\n    override fun ensureListPositionVisible(position: Int, incrementPixels: Int) {\n        mListView.post {\n            while (mListView.firstVisiblePosition + 1 > position && mListView.canScrollList(-1)) {\n                performScrollList(incrementPixels / 2)\n            }\n            while (mListView.lastVisiblePosition - 1 < position && mListView.canScrollList(1)) {\n                performScrollList(-incrementPixels / 2)\n            }\n        }\n    }\n\n    private fun performScrollList(offset: Int) {\n        val adpView = completionList\n        val down = SystemClock.uptimeMillis()\n        var ev = MotionEvent.obtain(down, down, MotionEvent.ACTION_DOWN, 0f, 0f, 0)\n\n        adpView.onTouchEvent(ev)\n        ev.recycle()\n\n        ev = MotionEvent.obtain(down, down, MotionEvent.ACTION_MOVE, 0f, offset.toFloat(), 0)\n        adpView.onTouchEvent(ev)\n        ev.recycle()\n\n        ev = MotionEvent.obtain(down, down, MotionEvent.ACTION_CANCEL, 0f, offset.toFloat(), 0)\n        adpView.onTouchEvent(ev)\n        ev.recycle()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/java/JavaCodeLanguage.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.java\n\nimport io.github.rosemoe.sora.lang.format.Formatter\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandleResult\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandler\nimport io.github.rosemoe.sora.langs.java.JavaLanguage\nimport io.github.rosemoe.sora.langs.java.JavaTextTokenizer\nimport io.github.rosemoe.sora.langs.java.Tokens\nimport io.github.rosemoe.sora.text.ContentReference\nimport io.github.rosemoe.sora.text.TextUtils\n\nopen class JavaCodeLanguage : JavaLanguage() {\n\n    private val javaFormatter = JavaFormatter()\n    private val newlineHandlers = arrayOf<NewlineHandler>(BraceHandler())\n\n    override fun getFormatter(): Formatter {\n        return javaFormatter\n    }\n\n    override fun getIndentAdvance(text: ContentReference, line: Int, column: Int): Int {\n        val content = text.getLine(line).substring(0, column)\n        return getIndentAdvance(content)\n    }\n\n    override fun useTab(): Boolean {\n        return false\n    }\n\n\n    private fun getIndentAdvance(content: String): Int {\n        val t = JavaTextTokenizer(content)\n        var token: Tokens\n        var advance = 0\n\n        while (t.nextToken().also { token = it } !== Tokens.EOF) {\n            if (token === Tokens.LBRACE) {\n                advance++\n            }\n            if (token === Tokens.LPAREN) {\n                advance++\n            }\n\n            if (advance > 0) {\n                if (token === Tokens.RBRACE) {\n                    advance--\n                }\n                if (token === Tokens.RPAREN) {\n                    advance--\n                }\n            }\n        }\n\n        advance = 0.coerceAtLeast(advance)\n\n        if (advance > 0) return 4\n        return 0\n    }\n\n    override fun getNewlineHandlers(): Array<NewlineHandler> {\n        return newlineHandlers\n    }\n\n    inner class BraceHandler : NewlineHandler {\n        override fun matchesRequirement(beforeText: String, afterText: String): Boolean {\n            return (beforeText.endsWith(\"{\") && afterText.startsWith(\"}\"))\n                    || (beforeText.endsWith(\"(\") && afterText.startsWith(\")\"))\n        }\n\n        override fun handleNewline(\n            beforeText: String,\n            afterText: String,\n            tabSize: Int\n        ): NewlineHandleResult {\n            val count: Int = TextUtils.countLeadingSpaceCount(beforeText, tabSize)\n            val advanceBefore: Int = getIndentAdvance(beforeText)\n            val advanceAfter: Int = getIndentAdvance(afterText)\n            var text: String\n            val sb: StringBuilder = StringBuilder(\"\\n\")\n                .append(TextUtils.createIndent(count + advanceBefore, tabSize, useTab()))\n                .append('\\n')\n                .append(\n                    TextUtils.createIndent(count + advanceAfter, tabSize, useTab())\n                        .also { text = it })\n            val shiftLeft = text.length + 1\n            return NewlineHandleResult(sb, shiftLeft)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/java/JavaFormatter.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.java\n\nimport io.github.rosemoe.sora.lang.format.Formatter\nimport io.github.rosemoe.sora.text.Content\nimport io.github.rosemoe.sora.text.TextRange\nimport java.util.*\nimport java.util.stream.Collectors\n\nclass JavaFormatter : Formatter {\n    private var receiver: Formatter.FormatResultReceiver? = null\n    private var isRunning = false\n\n    override fun format(text: Content, cursorRange: TextRange) {\n        isRunning = true\n        receiver?.onFormatSucceed(format(text.toString()), cursorRange)\n        isRunning = false\n    }\n\n    override fun formatRegion(text: Content, rangeToFormat: TextRange, cursorRange: TextRange) {\n        isRunning = true\n        val line = text.getLine(rangeToFormat.start.line)\n        val indents = if (line.trim().isEmpty()) line else line.substring(\n            0,\n            line.indexOf(line.trim().toString())\n        )\n        val textToFormat = text.subContent(\n            rangeToFormat.start.line,\n            rangeToFormat.start.column,\n            rangeToFormat.end.line,\n            rangeToFormat.end.column\n        )\n        val formattedRegion = format(textToFormat.toString()).split(\"\\n\")\n            .stream().map {\n                indents.toString() + it\n            }.collect(Collectors.joining(\"\\n\"))\n\n        text.replace(\n            rangeToFormat.start.line,\n            rangeToFormat.start.column,\n            rangeToFormat.end.line,\n            rangeToFormat.end.column,\n            formattedRegion\n        )\n\n        receiver?.onFormatSucceed(text.toString(), cursorRange)\n        isRunning = false\n    }\n\n    override fun setReceiver(receiver: Formatter.FormatResultReceiver?) {\n        this.receiver = receiver\n    }\n\n    override fun isRunning(): Boolean {\n        return isRunning\n    }\n\n    override fun destroy() {\n        receiver = null\n    }\n\n    private fun format(source: String): String {\n        val result = StringBuilder()\n        val charArray = trimSource(source).toCharArray()\n        val length = charArray.size\n\n        var index = 0\n        var indents = 0\n        var lineIndents = 0\n        var lineStartIndex = 0\n        var isSingleLineComment = false\n        var isMultiLineComment = false\n        var isJavaDoc = false\n        var isEscape = false\n        var isChar = false\n        var isString = false\n\n        while (index < length) {\n            val currentChar = charArray[index]\n            val nextCharIndex = index + 1\n            val isValidNextChar = isValidIndex(nextCharIndex, charArray)\n\n            if (isSingleLineComment) {\n                if (currentChar == '\\n') {\n                    result.append(currentChar)\n                    lineIndents = 0\n                    lineStartIndex = result.length\n                    addIndent(result, indents)\n                    isSingleLineComment = false\n                } else {\n                    result.append(currentChar)\n                }\n            } else if (isEscape) {\n                result.append(currentChar)\n                isEscape = false\n            } else if (currentChar == '\\\\') {\n                result.append(currentChar)\n                isEscape = true\n            } else if (isChar) {\n                if (currentChar == '\\'') {\n                    result.append(currentChar)\n                    isChar = false\n                } else {\n                    result.append(currentChar)\n                }\n            } else if (isString) {\n                if (currentChar == '\\\"') {\n                    result.append(currentChar)\n                    isString = false\n                } else {\n                    result.append(currentChar)\n                }\n            } else {\n                if (isMultiLineComment) {\n                    if (currentChar == '*') {\n                        if (isValidNextChar) {\n                            val nextChar = charArray[nextCharIndex]\n                            if (nextChar == '/') {\n                                isMultiLineComment = false\n                                isJavaDoc = false\n                            }\n                        }\n                    }\n                } else {\n                    if (currentChar == '/') {\n                        if (isValidNextChar) {\n                            val nextChar = charArray[nextCharIndex]\n                            if (nextChar == '/') {\n                                result.append(currentChar)\n                                result.append(nextChar)\n                                isSingleLineComment = true\n                                index = nextCharIndex + 1\n                                continue\n                            }\n                            if (nextChar == '*') {\n                                result.append(currentChar)\n                                result.append(nextChar)\n                                isMultiLineComment = true\n                                index = nextCharIndex + 1\n                                continue\n                            }\n                        }\n                    }\n                    if (currentChar == '\\'') {\n                        isChar = true\n                    }\n                    if (currentChar == '\\\"') {\n                        isString = true\n                    }\n                }\n                if (!isJavaDoc) {\n                    if (currentChar == '{' || currentChar == '(') {\n                        if (lineIndents <= 0) {\n                            ++indents\n                        }\n                        ++lineIndents\n                        if (lineIndents <= 0) lineIndents = 1\n                    }\n\n                    if (currentChar == '}' || currentChar == ')') {\n                        if (lineIndents == 0) {\n                            --indents\n                            --lineIndents\n                            if (result.length > lineStartIndex) {\n                                if (result[lineStartIndex] == '\\t') {\n                                    result.deleteCharAt(lineStartIndex)\n                                }\n                            }\n                        } else if (lineIndents == 1) {\n                            --indents\n                        }\n                        if (lineIndents > 0) --lineIndents\n                    }\n                }\n                result.append(currentChar)\n                if (currentChar == '\\n') {\n                    lineIndents = 0\n                    lineStartIndex = result.length\n                    addIndent(result, indents)\n                    if (isMultiLineComment) {\n                        if (isValidNextChar) {\n                            val nextChar = charArray[nextCharIndex]\n                            if (nextChar == '*') {\n                                isJavaDoc = true\n                                result.append(\" \")\n                            } else {\n                                isJavaDoc = false\n                            }\n                        }\n                    }\n                    if (isValidNextChar) {\n                        val nextChar = charArray[nextCharIndex]\n                        if (nextChar == '?' || nextChar == ':' || nextChar == '&'\n                            || nextChar == '|' || nextChar == '+'\n                        ) {\n                            result.append(\"\\t\")\n                        }\n                    }\n                }\n            }\n            ++index\n        }\n        return result.toString().replace(\"\\t\", \"    \")\n    }\n\n    private fun isValidIndex(index: Int, source: CharArray): Boolean {\n        return index < source.size && index > -1\n    }\n\n    private fun addIndent(builder: StringBuilder, indents: Int) {\n        for (i in 0 until indents) {\n            builder.append('\\t')\n        }\n    }\n\n    private fun trimSource(source: String): String {\n        return Arrays.stream(source.split(\"\\n\").toTypedArray())\n            .map { obj: String -> obj.trim { it <= ' ' } }\n            .collect(Collectors.joining(\"\\n\"))\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/json/JsonFormatter.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.json\n\nimport io.github.rosemoe.sora.lang.format.Formatter\nimport io.github.rosemoe.sora.text.Content\nimport io.github.rosemoe.sora.text.TextRange\nimport org.json.JSONArray\nimport org.json.JSONObject\n\nclass JsonFormatter : Formatter {\n    private var receiver: Formatter.FormatResultReceiver? = null\n    private var isRunning = false\n\n    override fun format(text: Content, cursorRange: TextRange) {\n        isRunning = true\n        receiver?.onFormatSucceed(format(text.toString()), cursorRange)\n        isRunning = false\n    }\n\n    override fun formatRegion(text: Content, rangeToFormat: TextRange, cursorRange: TextRange) {\n    }\n\n    private fun format(txt: String): String {\n        if (txt.isEmpty()) return txt\n\n        val isObject = txt.trim()[0] == '{'\n\n        return try {\n            if (isObject) JSONObject(txt).toString(2)\n            else JSONArray(txt).toString(2)\n        } catch (e: Exception) {\n            txt\n        }\n    }\n\n    override fun setReceiver(receiver: Formatter.FormatResultReceiver?) {\n        this.receiver = receiver\n    }\n\n    override fun isRunning(): Boolean {\n        return isRunning\n    }\n\n    override fun destroy() {\n        receiver = null\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/json/JsonLanguage.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.json\n\nimport com.raival.fileexplorer.App\nimport io.github.rosemoe.sora.lang.format.Formatter\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandleResult\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandler\nimport io.github.rosemoe.sora.langs.java.JavaTextTokenizer\nimport io.github.rosemoe.sora.langs.java.Tokens\nimport io.github.rosemoe.sora.langs.textmate.TextMateLanguage\nimport io.github.rosemoe.sora.text.ContentReference\nimport io.github.rosemoe.sora.text.TextUtils\nimport org.eclipse.tm4e.core.registry.IGrammarSource\nimport org.eclipse.tm4e.core.registry.IThemeSource\nimport java.io.InputStreamReader\nimport java.io.Reader\n\nclass JsonLanguage(\n    iThemeSource: IThemeSource,\n    iGrammarSource: IGrammarSource = IGrammarSource.fromInputStream(\n        App.appContext.assets.open(\"textmate/json/syntax/json.tmLanguage.json\"),\n        \"json.tmLanguage.json\",\n        null\n    ),\n    languageConfiguration: Reader = InputStreamReader(App.appContext.assets.open(\"textmate/json/language-configuration.json\")),\n    createIdentifiers: Boolean = true\n) : TextMateLanguage(iGrammarSource, languageConfiguration, iThemeSource, createIdentifiers) {\n\n    private val jsonFormatter = JsonFormatter()\n    private val newlineHandlers = arrayOf<NewlineHandler>(BraceHandler())\n\n\n    override fun getFormatter(): Formatter {\n        return jsonFormatter\n    }\n\n    override fun getIndentAdvance(text: ContentReference, line: Int, column: Int): Int {\n        val content = text.getLine(line).substring(0, column)\n        return getIndentAdvance(content)\n    }\n\n    override fun useTab(): Boolean {\n        return false\n    }\n\n\n    private fun getIndentAdvance(content: String): Int {\n        val t = JavaTextTokenizer(content)\n        var token: Tokens\n        var advance = 0\n\n        while (t.nextToken().also { token = it } !== Tokens.EOF) {\n            if (token === Tokens.LBRACE) {\n                advance++\n            }\n            if (token === Tokens.LBRACK) {\n                advance++\n            }\n\n            if (advance > 0) {\n                if (token === Tokens.RBRACE) {\n                    advance--\n                }\n                if (token === Tokens.RBRACE) {\n                    advance--\n                }\n            }\n        }\n\n        advance = 0.coerceAtLeast(advance)\n\n        if (advance > 0) return 4\n        return 0\n    }\n\n    override fun getNewlineHandlers(): Array<NewlineHandler> {\n        return newlineHandlers\n    }\n\n    inner class BraceHandler : NewlineHandler {\n        override fun matchesRequirement(beforeText: String, afterText: String): Boolean {\n            return (beforeText.endsWith(\"{\") && afterText.startsWith(\"}\"))\n                    || (beforeText.endsWith(\"[\") && afterText.startsWith(\"]\"))\n        }\n\n        override fun handleNewline(\n            beforeText: String,\n            afterText: String,\n            tabSize: Int\n        ): NewlineHandleResult {\n            val count: Int = TextUtils.countLeadingSpaceCount(beforeText, tabSize)\n            val advanceBefore: Int = getIndentAdvance(beforeText)\n            val advanceAfter: Int = getIndentAdvance(afterText)\n            var text: String\n            val sb: StringBuilder = StringBuilder(\"\\n\")\n                .append(TextUtils.createIndent(count + advanceBefore, tabSize, useTab()))\n                .append('\\n')\n                .append(\n                    TextUtils.createIndent(count + advanceAfter, tabSize, useTab())\n                        .also { text = it })\n            val shiftLeft = text.length + 1\n            return NewlineHandleResult(sb, shiftLeft)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/kotlin/KotlinCodeLanguage.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.kotlin\n\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.activity.editor.language.java.JavaFormatter\nimport io.github.rosemoe.sora.lang.format.Formatter\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandleResult\nimport io.github.rosemoe.sora.lang.smartEnter.NewlineHandler\nimport io.github.rosemoe.sora.langs.java.JavaTextTokenizer\nimport io.github.rosemoe.sora.langs.java.Tokens\nimport io.github.rosemoe.sora.langs.textmate.TextMateLanguage\nimport io.github.rosemoe.sora.text.ContentReference\nimport io.github.rosemoe.sora.text.TextUtils\nimport org.eclipse.tm4e.core.registry.IGrammarSource\nimport org.eclipse.tm4e.core.registry.IThemeSource\nimport java.io.InputStreamReader\nimport java.io.Reader\n\n\nclass KotlinCodeLanguage(\n    iThemeSource: IThemeSource,\n    iGrammarSource: IGrammarSource = IGrammarSource.fromInputStream(\n        App.appContext.assets.open(\"textmate/kotlin/syntax/kotlin.tmLanguage\"),\n        \"kotlin.tmLanguage\",\n        null\n    ),\n    languageConfiguration: Reader = InputStreamReader(App.appContext.assets.open(\"textmate/kotlin/language-configuration.json\")),\n    createIdentifiers: Boolean = true\n) : TextMateLanguage(iGrammarSource, languageConfiguration, iThemeSource, createIdentifiers) {\n\n    private val javaFormatter = JavaFormatter()\n    private val newlineHandlers = arrayOf<NewlineHandler>(BraceHandler())\n\n    override fun getFormatter(): Formatter {\n        return javaFormatter\n    }\n\n    override fun getIndentAdvance(text: ContentReference, line: Int, column: Int): Int {\n        val content = text.getLine(line).substring(0, column)\n        return getIndentAdvance(content)\n    }\n\n    override fun useTab(): Boolean {\n        return false\n    }\n\n\n    private fun getIndentAdvance(content: String): Int {\n        val t = JavaTextTokenizer(content)\n        var token: Tokens\n        var advance = 0\n\n        while (t.nextToken().also { token = it } !== Tokens.EOF) {\n            if (token === Tokens.LBRACE) {\n                advance++\n            }\n            if (token === Tokens.LPAREN) {\n                advance++\n            }\n\n            if (advance > 0) {\n                if (token === Tokens.RBRACE) {\n                    advance--\n                }\n                if (token === Tokens.RPAREN) {\n                    advance--\n                }\n            }\n        }\n\n        advance = 0.coerceAtLeast(advance)\n\n        if (advance > 0) return 4\n        return 0\n    }\n\n    override fun getNewlineHandlers(): Array<NewlineHandler> {\n        return newlineHandlers\n    }\n\n    inner class BraceHandler : NewlineHandler {\n        override fun matchesRequirement(beforeText: String, afterText: String): Boolean {\n            return (beforeText.endsWith(\"{\") && afterText.startsWith(\"}\"))\n                    || (beforeText.endsWith(\"(\") && afterText.startsWith(\")\"))\n        }\n\n        override fun handleNewline(\n            beforeText: String,\n            afterText: String,\n            tabSize: Int\n        ): NewlineHandleResult {\n            val count: Int = TextUtils.countLeadingSpaceCount(beforeText, tabSize)\n            val advanceBefore: Int = getIndentAdvance(beforeText)\n            val advanceAfter: Int = getIndentAdvance(afterText)\n            var text: String\n            val sb: StringBuilder = StringBuilder(\"\\n\")\n                .append(TextUtils.createIndent(count + advanceBefore, tabSize, useTab()))\n                .append('\\n')\n                .append(\n                    TextUtils.createIndent(count + advanceAfter, tabSize, useTab())\n                        .also { text = it })\n            val shiftLeft = text.length + 1\n            return NewlineHandleResult(sb, shiftLeft)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/language/xml/XmlLanguage.kt",
    "content": "package com.raival.fileexplorer.activity.editor.language.xml\n\nimport com.raival.fileexplorer.App\nimport io.github.rosemoe.sora.langs.textmate.TextMateLanguage\nimport org.eclipse.tm4e.core.registry.IGrammarSource\nimport org.eclipse.tm4e.core.registry.IThemeSource\nimport java.io.InputStreamReader\nimport java.io.Reader\n\nclass XmlLanguage(\n    iThemeSource: IThemeSource,\n    iGrammarSource: IGrammarSource = IGrammarSource.fromInputStream(\n        App.appContext.assets.open(\"textmate/xml/syntax/xml.tmLanguage.json\"),\n        \"xml.tmLanguage.json\",\n        null\n    ),\n    languageConfiguration: Reader = InputStreamReader(App.appContext.assets.open(\"textmate/xml/language-configuration.json\")),\n    createIdentifiers: Boolean = true\n) : TextMateLanguage(iGrammarSource, languageConfiguration, iThemeSource, createIdentifiers) {\n\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/scheme/DarkScheme.kt",
    "content": "package com.raival.fileexplorer.activity.editor.scheme\n\nimport io.github.rosemoe.sora.widget.schemes.EditorColorScheme\n\nclass DarkScheme : EditorColorScheme() {\n    override fun applyDefault() {\n        super.applyDefault()\n        setColor(ANNOTATION, -0x444ad7)\n        setColor(FUNCTION_NAME, -0x332f27)\n        setColor(IDENTIFIER_NAME, -0x332f27)\n        setColor(IDENTIFIER_VAR, -0x678956)\n        setColor(LITERAL, -0x9578a7)\n        setColor(OPERATOR, -0x332f27)\n        setColor(COMMENT, -0x7f7f80)\n        setColor(KEYWORD, -0x3387ce)\n        setColor(WHOLE_BACKGROUND, -0xd4d4d5)\n        setColor(TEXT_NORMAL, -0x332f27)\n        setColor(LINE_NUMBER_BACKGROUND, -0xcecccb)\n        setColor(LINE_NUMBER, -0x9f9c9a)\n        setColor(LINE_DIVIDER, -0x9f9c9a)\n        setColor(SCROLL_BAR_THUMB, -0x59595a)\n        setColor(SCROLL_BAR_THUMB_PRESSED, -0xa9a9aa)\n        setColor(SELECTED_TEXT_BACKGROUND, -0xc98948)\n        setColor(MATCHED_TEXT_BACKGROUND, -0xcda6c3)\n        setColor(CURRENT_LINE, -0xcdcdce)\n        setColor(SELECTION_INSERT, -0x332f27)\n        setColor(SELECTION_HANDLE, -0x332f27)\n        setColor(BLOCK_LINE, -0xa8a8a9)\n        setColor(BLOCK_LINE_CURRENT, -0x22a8a8a9)\n        setColor(NON_PRINTABLE_CHAR, -0x222223)\n        setColor(TEXT_SELECTED, -0x332f27)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/scheme/LightScheme.kt",
    "content": "package com.raival.fileexplorer.activity.editor.scheme\n\nimport io.github.rosemoe.sora.widget.schemes.EditorColorScheme\n\nclass LightScheme : EditorColorScheme() {\n    override fun applyDefault() {\n        super.applyDefault()\n        setColor(ANNOTATION, -0x9b9b9c)\n        setColor(FUNCTION_NAME, -0x1000000)\n        setColor(IDENTIFIER_NAME, -0x1000000)\n        setColor(IDENTIFIER_VAR, -0x479cc2)\n        setColor(LITERAL, -0xd5ff01)\n        setColor(OPERATOR, -0xc60000)\n        setColor(COMMENT, -0xc080a1)\n        setColor(KEYWORD, -0x80ff8c)\n        setColor(WHOLE_BACKGROUND, -0x1)\n        setColor(TEXT_NORMAL, -0x1000000)\n        setColor(LINE_NUMBER_BACKGROUND, -0x1)\n        setColor(LINE_NUMBER, -0x878788)\n        setColor(SELECTED_TEXT_BACKGROUND, -0xcc6601)\n        setColor(MATCHED_TEXT_BACKGROUND, -0x2b2b2c)\n        setColor(CURRENT_LINE, -0x170d02)\n        setColor(SELECTION_INSERT, -0xfc1415)\n        setColor(SELECTION_HANDLE, -0xfc1415)\n        setColor(BLOCK_LINE, -0x272728)\n        setColor(BLOCK_LINE_CURRENT, 0)\n        setColor(TEXT_SELECTED, -0x1)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/editor/view/SymbolInputView.kt",
    "content": "package com.raival.fileexplorer.activity.editor.view\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport android.util.TypedValue\nimport android.widget.Button\nimport android.widget.LinearLayout\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.util.Utils\nimport io.github.rosemoe.sora.widget.CodeEditor\n\nclass SymbolInputView : LinearLayout {\n    private var textColor = 0\n    private lateinit var editor: CodeEditor\n\n    constructor(context: Context?) : super(context)\n\n    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)\n\n    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(\n        context,\n        attrs,\n        defStyleAttr\n    )\n\n    init {\n        setBackgroundColor(Utils.getColorAttribute(R.attr.backgroundColor, context))\n        setTextColor(Utils.getColorAttribute(R.attr.colorOnSurface, context))\n        orientation = HORIZONTAL\n    }\n\n    fun bindEditor(editor: CodeEditor): SymbolInputView {\n        this.editor = editor\n        return this\n    }\n\n    fun setTextColor(color: Int): SymbolInputView {\n        for (i in 0 until childCount) {\n            (getChildAt(i) as Button).setTextColor(color)\n        }\n        textColor = color\n        return this\n    }\n\n    fun addSymbols(symbols: Array<String>): SymbolInputView {\n        for (symbol in symbols) addSymbol(symbol)\n        return this\n    }\n\n    fun addSymbol(\n        display: String,\n        content: String = display,\n        cursorPos: Int = content.length\n    ): SymbolInputView {\n        val btn = Button(context, null, android.R.attr.buttonStyleSmall)\n        btn.text = display\n        val out = TypedValue()\n        context.theme.resolveAttribute(android.R.attr.selectableItemBackground, out, true)\n        btn.setBackgroundResource(out.resourceId)\n        btn.setTextColor(textColor)\n        addView(btn, LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT))\n\n        btn.setOnClickListener {\n            if (this::editor.isInitialized) editor.insertText(content, cursorPos)\n        }\n        return this\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/model/MainViewModel.kt",
    "content": "package com.raival.fileexplorer.activity.model\n\nimport androidx.lifecycle.ViewModel\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.file.model.Task\n\nclass MainViewModel : ViewModel() {\n    @JvmField\n    val tasks = arrayListOf<Task>()\n    private val dataHolders: MutableList<BaseDataHolder> = arrayListOf()\n\n    fun addDataHolder(dataHolder: BaseDataHolder) {\n        dataHolders.add(dataHolder)\n    }\n\n    fun getDataHolders(): ArrayList<BaseDataHolder> {\n        return dataHolders as ArrayList<BaseDataHolder>\n    }\n\n    fun getDataHolder(tag: String): BaseDataHolder? {\n        for (dataHolder in dataHolders) {\n            if (dataHolder.tag == tag) return dataHolder\n        }\n        return null\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/activity/model/TextEditorViewModel.kt",
    "content": "package com.raival.fileexplorer.activity.model\n\nimport androidx.lifecycle.ViewModel\nimport io.github.rosemoe.sora.text.Content\nimport java.io.File\n\nclass TextEditorViewModel : ViewModel() {\n    var file: File? = null\n    var content: Content? = null\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/common/BackgroundTask.kt",
    "content": "package com.raival.fileexplorer.common\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport android.os.Handler\nimport android.os.Looper\nimport android.view.View\nimport android.widget.TextView\nimport androidx.appcompat.app.AlertDialog\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.raival.fileexplorer.R\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\n\nclass BackgroundTask {\n    private lateinit var preTask: Runnable\n    private lateinit var task: Runnable\n    private lateinit var postTask: Runnable\n    private lateinit var alertDialog: AlertDialog\n\n    fun setTasks(preTask: Runnable, task: Runnable, postTask: Runnable) {\n        this.preTask = preTask\n        this.task = task\n        this.postTask = postTask\n    }\n\n    fun run() {\n        CoroutineScope(Dispatchers.IO).launch {\n            Handler(Looper.getMainLooper()).post(preTask)\n            task.run()\n            Handler(Looper.getMainLooper()).post(postTask)\n        }.start()\n    }\n\n    fun dismiss() {\n        if (this::alertDialog.isInitialized) alertDialog.dismiss()\n    }\n\n    @SuppressLint(\"ResourceType\")\n    fun showProgressDialog(msg: String, activity: Activity) {\n        alertDialog = MaterialAlertDialogBuilder(activity)\n            .setCancelable(false)\n            .setView(getProgressView(msg, activity))\n            .show()\n    }\n\n    private fun getProgressView(msg: String, activity: Activity): View {\n        @SuppressLint(\"InflateParams\") val v =\n            activity.layoutInflater.inflate(R.layout.progress_view, null)\n        (v.findViewById<View>(R.id.msg) as TextView).text = msg\n        return v\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/common/dialog/CustomDialog.kt",
    "content": "package com.raival.fileexplorer.common.dialog\n\nimport android.content.Context\nimport android.graphics.drawable.Drawable\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.view.WindowManager\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.appcompat.content.res.AppCompatResources\nimport com.google.android.material.bottomsheet.BottomSheetDialogFragment\nimport com.google.android.material.button.MaterialButton\nimport com.google.android.material.imageview.ShapeableImageView\nimport com.google.android.material.textfield.TextInputLayout\nimport com.raival.fileexplorer.R\n\nclass CustomDialog : BottomSheetDialogFragment() {\n    private val views = ArrayList<View>()\n    private lateinit var icon: Drawable\n    private lateinit var title: String\n    private lateinit var msg: String\n    private lateinit var positiveButton: String\n    private lateinit var positiveListener: Listener\n    private lateinit var negativeButton: String\n    private lateinit var negativeListener: Listener\n    private lateinit var neutralButton: String\n    private lateinit var neutralListener: Listener\n    private lateinit var msgView: TextView\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        dialog?.window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)\n        return inflater.inflate(R.layout.common_custom_dialog, container, true)\n    }\n\n    override fun getTheme(): Int {\n        return R.style.ThemeOverlay_Material3_BottomSheetDialog\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n\n        val titleView = view.findViewById<TextView>(R.id.dialog_title)\n        msgView = view.findViewById(R.id.dialog_msg)\n        val imageView = view.findViewById<ShapeableImageView>(R.id.dialog_icon)\n        val containerView = view.findViewById<LinearLayout>(R.id.dialog_container)\n        val positiveButtonView = view.findViewById<MaterialButton>(R.id.dialog_positive_button)\n        val negativeButtonView = view.findViewById<MaterialButton>(R.id.dialog_negative_button)\n        val neutralButtonView = view.findViewById<MaterialButton>(R.id.dialog_neutral_button)\n\n        if (this::icon.isInitialized) {\n            imageView.visibility = View.VISIBLE\n            imageView.setImageDrawable(icon)\n        }\n        if (this::title.isInitialized) {\n            titleView.visibility = View.VISIBLE\n            titleView.text = title\n        }\n        if (this::msg.isInitialized) {\n            msgView.visibility = View.VISIBLE\n            msgView.text = msg\n        }\n        if (views.size > 0) {\n            containerView.visibility = View.VISIBLE\n            for (view1 in views) {\n                containerView.addView(view1)\n            }\n        }\n        if (this::positiveButton.isInitialized) {\n            positiveButtonView.visibility = View.VISIBLE\n            positiveButtonView.text = positiveButton\n            positiveButtonView.setOnClickListener { view1: View? ->\n                positiveListener.listener.onClick(view1)\n                if (positiveListener.dismiss) dismiss()\n            }\n        }\n        if (this::negativeButton.isInitialized) {\n            negativeButtonView.visibility = View.VISIBLE\n            negativeButtonView.text = negativeButton\n            negativeButtonView.setOnClickListener { view1: View? ->\n                negativeListener.listener.onClick(view1)\n                if (negativeListener.dismiss) dismiss()\n            }\n        }\n        if (this::neutralButton.isInitialized) {\n            neutralButtonView.visibility = View.VISIBLE\n            neutralButtonView.text = neutralButton\n            neutralButtonView.setOnClickListener { view1: View? ->\n                neutralListener.listener.onClick(view1)\n                if (neutralListener.dismiss) dismiss()\n            }\n        }\n    }\n\n    fun setTitle(title: String): CustomDialog {\n        this.title = title\n        return this\n    }\n\n    fun setMsg(msg: String): CustomDialog {\n        this.msg = msg\n        if (this::msgView.isInitialized) msgView.text = msg\n        return this\n    }\n\n    fun setIcon(resId: Int): CustomDialog {\n        icon = AppCompatResources.getDrawable(requireActivity(), resId)!!\n        return this\n    }\n\n    fun setIconDrawable(drawable: Drawable): CustomDialog {\n        this.icon = drawable\n        return this\n    }\n\n    fun addView(view: View): CustomDialog {\n        views.add(view)\n        return this\n    }\n\n    fun setPositiveButton(\n        label: String,\n        listener: View.OnClickListener?,\n        dismiss: Boolean\n    ): CustomDialog {\n        positiveButton = label\n        positiveListener = Listener(listener ?: emptyListener(), dismiss)\n        return this\n    }\n\n    fun setNegativeButton(\n        label: String,\n        listener: View.OnClickListener?,\n        dismiss: Boolean\n    ): CustomDialog {\n        negativeButton = label\n        negativeListener = Listener(listener ?: emptyListener(), dismiss)\n        return this\n    }\n\n    fun setNeutralButton(\n        label: String,\n        listener: View.OnClickListener?,\n        dismiss: Boolean\n    ): CustomDialog {\n        neutralButton = label\n        neutralListener = Listener(listener ?: emptyListener(), dismiss)\n        return this\n    }\n\n    fun createInput(context: Context, hint: String): TextInputLayout {\n        return (LayoutInflater.from(context)\n            .inflate(R.layout.input, null, false) as TextInputLayout)\n            .apply {\n                setHint(hint)\n            }\n    }\n\n    private fun emptyListener(): View.OnClickListener = View.OnClickListener { }\n\n    private class Listener(var listener: View.OnClickListener, var dismiss: Boolean)\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/common/dialog/OptionsDialog.kt",
    "content": "package com.raival.fileexplorer.common.dialog\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport com.google.android.material.bottomsheet.BottomSheetDialogFragment\nimport com.raival.fileexplorer.R\n\nclass OptionsDialog(var title: String) : BottomSheetDialogFragment() {\n    private val options = ArrayList<OptionHolder>()\n    private var container: LinearLayout? = null\n\n    fun addOption(\n        label: String?,\n        listener: View.OnClickListener?,\n        dismissOnClick: Boolean\n    ): OptionsDialog {\n        return addOption(label, 0, listener, dismissOnClick)\n    }\n\n    fun addOption(\n        label: String?,\n        resId: Int,\n        listener: View.OnClickListener?,\n        dismissOnClick: Boolean\n    ): OptionsDialog {\n        val optionHolder = OptionHolder()\n        optionHolder.dismissOnClick = dismissOnClick\n        optionHolder.label = label\n        optionHolder.listener = listener\n        optionHolder.res = resId\n        options.add(optionHolder)\n        return this\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        return inflater.inflate(R.layout.common_options_dialog, container, false)\n    }\n\n    override fun getTheme(): Int {\n        return R.style.ThemeOverlay_Material3_BottomSheetDialog\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        container = view.findViewById(R.id.container)\n        (view.findViewById<View>(R.id.title) as TextView).text = title\n        view.findViewById<View>(R.id.msg).visibility = View.GONE\n        addOptions()\n    }\n\n    private fun addOptions() {\n        for (optionHolder in options) {\n            val v = layoutInflater.inflate(R.layout.common_options_dialog_item, container, false)\n            if (optionHolder.res != 0) {\n                val icon = v.findViewById<ImageView>(R.id.icon)\n                icon.visibility = View.VISIBLE\n                icon.setImageResource(optionHolder.res)\n            }\n            (v.findViewById<View>(R.id.label) as TextView).text = optionHolder.label\n            v.findViewById<View>(R.id.background).setOnClickListener { view: View? ->\n                if (optionHolder.listener != null) optionHolder.listener!!.onClick(view)\n                if (optionHolder.dismissOnClick) v.post { dismiss() }\n            }\n            container!!.addView(v)\n        }\n    }\n\n    private class OptionHolder {\n        var label: String? = null\n        var res = 0\n        var listener: View.OnClickListener? = null\n        var dismissOnClick = false\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/common/view/BottomBarView.kt",
    "content": "package com.raival.fileexplorer.common.view\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.util.PrefsUtils\n\nclass BottomBarView : LinearLayout {\n    constructor(context: Context?) : super(context)\n    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)\n    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(\n        context,\n        attrs,\n        defStyleAttr\n    )\n\n    fun addItem(tag: String?, icon: Int, clickListener: OnClickListener?) {\n        val view = (context\n            .getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater)\n            .inflate(R.layout.bottom_bar_menu_item, this, false)\n        view.setOnClickListener(clickListener)\n        view.tooltipText = tag\n        val label = view.findViewById<TextView>(R.id.label)\n        if (PrefsUtils.Settings.showBottomToolbarLabels) {\n            label.text = tag\n        } else {\n            label.visibility = GONE\n        }\n        val image = view.findViewById<ImageView>(R.id.icon)\n        image.setImageResource(icon)\n        addView(view)\n    }\n\n    fun addItem(tag: String?, view: View) {\n        view.tooltipText = tag\n        addView(view)\n    }\n\n    fun clear() {\n        removeAllViews()\n    }\n\n    fun onUpdatePrefs() {\n        for (i in 0 until childCount) {\n            val view = getChildAt(i)\n            val label = view.findViewById<View>(R.id.label)\n            if (label != null) {\n                label.visibility =\n                    if (PrefsUtils.Settings.showBottomToolbarLabels) VISIBLE else GONE\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/common/view/TabView.kt",
    "content": "package com.raival.fileexplorer.common.view\n\nimport android.animation.ObjectAnimator\nimport android.content.Context\nimport android.graphics.drawable.GradientDrawable\nimport android.util.AttributeSet\nimport android.util.TypedValue\nimport android.view.Gravity\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.HorizontalScrollView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.toDp\nimport com.raival.fileexplorer.util.Utils\n\nclass TabView : HorizontalScrollView {\n    private var tabsArray = ArrayList<Tab>()\n    private var textColor = 0\n    private var indicatorColor = 0\n    private var textSize = 0\n    private lateinit var onUpdateListener: OnUpdateTabViewListener\n    private lateinit var onBulkRemoveListener: OnBulkRemoveListener\n    private var container: LinearLayout = LinearLayout(context)\n\n    constructor(context: Context?) : super(context)\n\n    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)\n\n    init {\n        addView(\n            container,\n            ViewGroup.LayoutParams(\n                ViewGroup.LayoutParams.MATCH_PARENT,\n                ViewGroup.LayoutParams.MATCH_PARENT\n            )\n        )\n        isFillViewport = true\n        isVerticalScrollBarEnabled = false\n        isHorizontalScrollBarEnabled = false\n        textColor = Utils.getColorAttribute(R.attr.colorPrimary, context)\n        indicatorColor = Utils.getColorAttribute(R.attr.colorPrimary, context)\n        textSize = 14\n    }\n\n    @JvmOverloads\n    fun addNewTab(tag: String, select: Boolean = true): Tab {\n        return insertNewTabAt(tabsArray.size, tag, select)\n    }\n\n    fun removeTabs(ids: Array<String>) {\n        val selectedTabPos = selectedTabPosition\n        for (id in ids) {\n            val pos = getTabPositionByTag(id)\n            if (!valid(pos)) continue\n            tabsArray.removeAt(pos)\n            container.removeView(container.getChildAt(pos))\n        }\n        if (tabsArray.size == 0 && this::onUpdateListener.isInitialized) {\n            onUpdateListener.onUpdate(null, ON_EMPTY)\n            return\n        }\n        val tab = tabsArray[validatePosition(selectedTabPos)]\n        tab.select(true)\n        if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(tab, ON_SELECT)\n    }\n\n    private fun validatePosition(i: Int): Int {\n        return if (i >= tabsArray.size) tabsArray.size - 1 else i.coerceAtLeast(0)\n    }\n\n    @JvmOverloads\n    fun insertNewTabAt(pos: Int, tag: String, select: Boolean = true): Tab {\n        if (!isUnique(tag)) {\n            val oldSelectedTab = selectedTab\n            oldSelectedTab!!.select(false)\n            if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                oldSelectedTab,\n                ON_UNSELECT\n            )\n            val newTab = getTabByTag(tag)\n            newTab!!.select(true)\n            if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(newTab, ON_SELECT)\n            return newTab\n        }\n        val oldSelectedTab = selectedTab\n        val tab = Tab(tag, createTabView(), select)\n        tabsArray.add(pos, tab)\n        if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(tab, ON_CREATE)\n        if (select) {\n            if (oldSelectedTab != null) {\n                oldSelectedTab.select(false)\n                if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                    oldSelectedTab,\n                    ON_UNSELECT\n                )\n            }\n            if (this::onUpdateListener.isInitialized) {\n                onUpdateListener.onUpdate(tab, ON_SELECT)\n            }\n        }\n        container.addView(tab.view, pos)\n        scrollToTab(tab)\n        return tab\n    }\n\n    private fun removeTabAt(pos: Int) {\n        if (!valid(pos)) return\n        if (tabsArray.size == 1 || selectedTabPosition != pos) {\n            container.removeViewAt(pos)\n            val tempTab = tabsArray[pos]\n            tabsArray.removeAt(pos)\n            if (this::onUpdateListener.isInitialized) {\n                onUpdateListener.onUpdate(tempTab, ON_REMOVE)\n                onUpdateListener.onUpdate(null, ON_EMPTY)\n            }\n            return\n        }\n        container.removeViewAt(pos)\n        val tempTab = tabsArray[pos]\n        tabsArray.removeAt(pos)\n        if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(tempTab, ON_REMOVE)\n        val limit = tabsArray.size - 1\n        val newTabToSelect: Tab = if (pos > limit) {\n            tabsArray[pos - 1]\n        } else {\n            tabsArray[pos]\n        }\n        newTabToSelect.select(true)\n        if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n            newTabToSelect,\n            ON_SELECT\n        )\n    }\n\n    fun removeTab(id: String) {\n        for ((i, tab) in tabsArray.withIndex()) {\n            if (tab.tag == id) {\n                removeTabAt(i)\n                return\n            }\n        }\n    }\n\n    fun removeSelectedTab() {\n        removeTabAt(selectedTabPosition)\n    }\n\n    fun removeAllTabs() {\n        if (this::onBulkRemoveListener.isInitialized) onBulkRemoveListener.onBulkRemove(\n            tabsArray,\n            true\n        )\n        tabsArray.clear()\n        container.removeAllViews()\n        if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(null, ON_EMPTY)\n    }\n\n    private fun removeAllTabsExcept(pos: Int) {\n        if (!valid(pos)) return\n        val exception = tabsArray[pos]\n        tabsArray.removeAt(pos)\n        if (this::onBulkRemoveListener.isInitialized) onBulkRemoveListener.onBulkRemove(\n            tabsArray,\n            false\n        )\n        tabsArray.clear()\n        container.removeAllViews()\n        tabsArray.add(exception)\n        container.addView(exception.view)\n        if (!exception.isSelected) {\n            exception.select(true)\n            if (this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                exception,\n                ON_SELECT\n            )\n        }\n        if (tabsArray.size == 0 && this::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n            null,\n            ON_EMPTY\n        )\n    }\n\n    fun removeAllTabsExceptSelectedTab() {\n        removeAllTabsExcept(selectedTabPosition)\n    }\n\n    private fun valid(pos: Int): Boolean {\n        return if (tabsArray.isEmpty()) false else pos > 0 && pos < tabsArray.size\n    }\n\n    private fun isUnique(s: String): Boolean {\n        for (tab in tabsArray) {\n            if (tab.tag == s) return false\n        }\n        return true\n    }\n\n    fun setTextSize(s: Int) {\n        textSize = s\n    }\n\n    fun setOnUpdateTabViewListener(l: OnUpdateTabViewListener) {\n        onUpdateListener = l\n    }\n\n    fun setOnBulkRemoveListener(l: OnBulkRemoveListener) {\n        onBulkRemoveListener = l\n    }\n\n    fun getTabByTag(tag: String?): Tab? {\n        for (tab in tabsArray) {\n            if (tab.tag == tag) return tab\n        }\n        return null\n    }\n\n    private fun getTabPositionByTag(tag: String): Int {\n        for ((i, tab) in tabsArray.withIndex()) {\n            if (tab.tag == tag) return i\n        }\n        return -1\n    }\n\n    val tabCount: Int get() = tabsArray.size\n\n    private val selectedTabPosition: Int\n        get() {\n            for ((i, tab) in tabsArray.withIndex()) {\n                if (tab.isSelected) return i\n            }\n            return -1\n        }\n\n    val selectedTabId: String?\n        get() {\n            for (tab in tabsArray) {\n                if (tab.isSelected) return tab.tag\n            }\n            return null\n        }\n    val selectedTab: Tab?\n        get() {\n            for (tab in tabsArray) {\n                if (tab.isSelected) return tab\n            }\n            return null\n        }\n\n    fun tabAnimation(v: View?, event: String?) {\n        when (event) {\n            \"onSelect\" -> {\n                val indicator = v!!.findViewWithTag<View>(\"tab_indicator\")\n                ObjectAnimator.ofFloat(\n                    indicator,\n                    \"translationY\",\n                    2f.toDp(),\n                    (-3f).toDp(),\n                    0f\n                ).setDuration(500).start()\n            }\n            \"onReselect\" -> {\n                val indicator = v!!.findViewWithTag<View>(\"tab_indicator\")\n                ObjectAnimator.ofFloat(indicator, \"translationY\", 0f, (1.5f).toDp(), 0f)\n                    .setDuration(400).start()\n            }\n            \"onUnselect\" -> {\n                val indicator = v!!.findViewWithTag<View>(\"tab_indicator\")\n                ObjectAnimator.ofFloat(indicator, \"translationY\", 0f, 2f.toDp())\n                    .setDuration(400).start()\n            }\n        }\n    }\n\n    private fun createTabView(): View {\n        val padding = 8.toDp()\n        val bg = LinearLayout(context)\n        bg.orientation = LinearLayout.VERTICAL\n        bg.tag = \"tab_background\"\n        bg.setPadding(0, 0, padding, 0)\n        bg.gravity = Gravity.CENTER_VERTICAL or Gravity.CENTER_HORIZONTAL\n        bg.minimumWidth = 80.toDp()\n        bg.layoutParams = ViewGroup.LayoutParams(\n            ViewGroup.LayoutParams.WRAP_CONTENT,\n            ViewGroup.LayoutParams.MATCH_PARENT\n        )\n        val out = TypedValue()\n        context.theme.resolveAttribute(android.R.attr.selectableItemBackground, out, true)\n        bg.setBackgroundResource(out.resourceId)\n        val text = TextView(context)\n        text.text = \"\"\n        text.setTextColor(textColor)\n        text.textSize = textSize.toFloat()\n        text.tag = \"tab_text\"\n        text.gravity = Gravity.CENTER_VERTICAL or Gravity.CENTER_HORIZONTAL\n        val line = LinearLayout(context)\n        val gd = GradientDrawable()\n        val dp8 = 8f.toDp()\n        gd.setColor(indicatorColor)\n        gd.cornerRadii = floatArrayOf(\n            dp8,\n            dp8,\n            dp8,\n            dp8,\n            0f,\n            0f,\n            0f,\n            0f\n        )\n        line.background = gd\n        line.tag = \"tab_indicator\"\n        bg.addView(text, LinearLayout.LayoutParams(-2, 0, 1f))\n        bg.addView(line, LinearLayout.LayoutParams(-1, 3.toDp()))\n        return bg\n    }\n\n    fun scrollToTab(tab: Tab?) {\n        if (tab?.view == null) return\n        post { smoothScrollTo(tab.view.x.toInt() - 50.toDp(), 0) }\n    }\n\n    val tags: ArrayList<String>\n        get() {\n            val tags = ArrayList<String>()\n            for (tab in tabsArray) {\n                tags.add(tab.tag)\n            }\n            return tags\n        }\n\n    /**\n     * Interface\n     *\n     *\n     * Events called when create/insert new tab:\n     * onCreate > onUnselect? > onSelect?\n     *\n     *\n     * Events called when remove a single tab new tab:\n     * onRemove > onSelect?\n     *\n     *\n     * Events called when remove moe than one tab:\n     * onBulkRemove > onSelect?\n     *\n     *\n     * Events called when remove all tabs:\n     * onRemoveAll\n     *\n     *\n     * Event called when update a tab:\n     * onUpdate\n     */\n    interface OnUpdateTabViewListener {\n        fun onUpdate(tab: Tab?, event: Int)\n    }\n\n    interface OnBulkRemoveListener {\n        fun onBulkRemove(array: ArrayList<Tab>?, all: Boolean)\n    }\n\n    inner class Tab(val tag: String, val view: View, var isSelected: Boolean) {\n        private var name: String = \"\"\n\n        init {\n            select(isSelected)\n            view.setOnClickListener {\n                if (selectedTab == null) {\n                    select(true)\n                    if (this@TabView::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                        this,\n                        ON_SELECT\n                    )\n                    return@setOnClickListener\n                }\n                if (this.isSelected) {\n                    if (this@TabView::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                        this,\n                        ON_RESELECT\n                    )\n                    tabAnimation(this.view, \"onReselect\")\n                    return@setOnClickListener\n                }\n                val oldSelectedTab = selectedTab\n                oldSelectedTab!!.select(false)\n                if (this@TabView::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                    oldSelectedTab,\n                    ON_UNSELECT\n                )\n                select(true)\n                if (this@TabView::onUpdateListener.isInitialized) onUpdateListener.onUpdate(\n                    this,\n                    ON_SELECT\n                )\n            }\n            view.setOnLongClickListener {\n                if (this@TabView::onUpdateListener.isInitialized) {\n                    onUpdateListener.onUpdate(this, ON_LONG_CLICK)\n                    return@setOnLongClickListener true\n                }\n                false\n            }\n        }\n\n        fun setName(s: String) {\n            name = s\n            (view.findViewWithTag<View>(\"tab_text\") as TextView).text = s\n        }\n\n        fun getName(): String = name\n\n        fun select(s: Boolean) {\n            isSelected = s\n            if (s) {\n                view.alpha = 1f\n                tabAnimation(view, \"onSelect\")\n                scrollToTab(getTabByTag(tag))\n            } else {\n                view.alpha = 0.7f\n                tabAnimation(view, \"onUnselect\")\n            }\n        }\n    }\n\n    companion object {\n        const val ON_CREATE = 1\n        const val ON_SELECT = 2\n        const val ON_LONG_CLICK = 3\n        const val ON_RESELECT = 4\n        const val ON_UNSELECT = -1\n        const val ON_REMOVE = -2\n        const val ON_EMPTY = 0\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/extension/File.kt",
    "content": "package com.raival.fileexplorer.extension\n\nimport android.annotation.SuppressLint\nimport android.content.ActivityNotFoundException\nimport android.content.Intent\nimport android.net.Uri\nimport android.os.Environment\nimport android.os.StatFs\nimport android.webkit.MimeTypeMap\nimport androidx.core.content.FileProvider\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.tab.file.misc.FileMimeTypes\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport java.io.File\nimport java.text.SimpleDateFormat\n\nfun File.getFileDetails(): String {\n    val sb = StringBuilder()\n    sb.append(getLastModifiedDate())\n    sb.append(\"  |  \")\n    if (this.isFile) {\n        sb.append(length().toFormattedSize())\n    } else {\n        sb.append(getFormattedFileCount())\n    }\n    return sb.toString()\n}\n\nfun File.getShortLabel(maxLength: Int): String {\n    var name = Uri.parse(this.absolutePath).lastPathSegment\n    if (isExternalStorageFolder()) {\n        name = FileUtils.INTERNAL_STORAGE\n    }\n    if (name!!.length > maxLength) {\n        name = name.substring(0, maxLength - 3) + \"...\"\n    }\n    return name\n}\n\nfun File.isExternalStorageFolder(): Boolean {\n    return this.absolutePath == Environment.getExternalStorageDirectory().absolutePath\n}\n\nfun File.getAvailableMemoryBytes(): Long {\n    val statFs = StatFs(this.absolutePath)\n    return statFs.blockSizeLong * statFs.availableBlocksLong\n}\n\nfun File.getTotalMemoryBytes(): Long {\n    val statFs = StatFs(this.absolutePath)\n    return statFs.blockSizeLong * statFs.blockCountLong\n}\n\nfun File.getUsedMemoryBytes(): Long {\n    return getTotalMemoryBytes() - getAvailableMemoryBytes()\n}\n\nfun File.getFormattedFileCount(): String {\n    val noItemsString = \"Empty folder\"\n    if (this.isFile) {\n        return noItemsString\n    }\n    var files = 0\n    var folders = 0\n    val fileList = this.listFiles() ?: return noItemsString\n    for (item in fileList) {\n        if (item.isFile) files++ else folders++\n    }\n    val sb = java.lang.StringBuilder()\n    if (folders > 0) {\n        sb.append(folders)\n        sb.append(\" folder\")\n        if (folders > 1) sb.append(\"s\")\n        if (files > 0) sb.append(\", \")\n    }\n    if (files > 0) {\n        sb.append(files)\n        sb.append(\" file\")\n        if (files > 1) sb.append(\"s\")\n    }\n    return if (folders == 0 && files == 0) noItemsString else sb.toString()\n}\n\nfun File.getMimeTypeFromFile(): String {\n    return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension)\n        ?: getMimeTypeFromExtension()\n}\n\nfun File.getMimeTypeFromExtension(): String {\n    val type = FileMimeTypes.mimeTypes[extension]\n    return type ?: FileMimeTypes.default\n}\n\nfun File.openFileWith(anonymous: Boolean) {\n    val i = Intent(Intent.ACTION_VIEW)\n    val uri = FileProvider.getUriForFile(\n        App.appContext, App.appContext.packageName + \".provider\",\n        this\n    )\n    i.setDataAndType(uri, if (anonymous) \"*/*\" else getMimeTypeFromFile())\n    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)\n    i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)\n    i.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)\n    try {\n        App.appContext.startActivity(i)\n    } catch (e: ActivityNotFoundException) {\n        if (!anonymous) {\n            openFileWith(true)\n        } else {\n            showMsg(\"Couldn't find any app that can open this type of files\")\n        }\n    } catch (e: Exception) {\n        //Log.i(TAG, e);\n        showMsg(\"Failed to open this file\")\n    }\n}\n\nfun File.getFolderSize(): Long {\n    var size: Long = 0\n    val list = listFiles()\n    if (list != null) {\n        for (child in list) {\n            size = if (child.isFile) {\n                size + child.length()\n            } else {\n                size + child.getFolderSize()\n            }\n        }\n    }\n    return size\n}\n\nfun File.getAllFilesInDir(extension: String): ArrayList<String> {\n    if (!exists() || isFile) {\n        return ArrayList()\n    }\n    val list = arrayListOf<String>()\n    val content = listFiles()\n    if (content != null) {\n        for (file in content) {\n            if (file.isFile && file.name.endsWith(\".$extension\")) {\n                list.add(file.absolutePath)\n            } else {\n                list.addAll(file.getAllFilesInDir(extension))\n            }\n        }\n    }\n    return list\n}\n\n@SuppressLint(\"SimpleDateFormat\")\nfun File.getLastModifiedDate(REGULAR_DATE_FORMAT: String = \"MMM dd , hh:mm a\"): String {\n    return SimpleDateFormat(REGULAR_DATE_FORMAT).format(lastModified())\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/extension/Int.kt",
    "content": "package com.raival.fileexplorer.extension\n\nimport android.util.TypedValue\nimport com.raival.fileexplorer.App\n\nfun Int.toDp(): Int = TypedValue.applyDimension(\n    TypedValue.COMPLEX_UNIT_DIP,\n    this.toFloat(),\n    App.appContext.resources.displayMetrics\n).toInt()\n\nfun Float.toDp(): Float = TypedValue.applyDimension(\n    TypedValue.COMPLEX_UNIT_DIP,\n    this,\n    App.appContext.resources.displayMetrics\n)"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/extension/Long.kt",
    "content": "package com.raival.fileexplorer.extension\n\nimport java.text.DecimalFormat\nimport kotlin.math.log10\nimport kotlin.math.pow\n\nfun Long.toFormattedSize(): String {\n    if (this <= 0) return \"0 B\"\n    val units = arrayOf(\"B\", \"kB\", \"MB\", \"GB\", \"TB\")\n    val digitGroups = (log10(this.toDouble()) / log10(1024.0)).toInt()\n    return DecimalFormat(\"#,##0.#\").format(\n        this / 1024.0.pow(digitGroups.toDouble())\n    ) + \" \" + units[digitGroups]\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/extension/String.kt",
    "content": "package com.raival.fileexplorer.extension\n\nimport com.google.gson.Gson\nimport com.google.gson.reflect.TypeToken\n\nfun String.getStringList(): ArrayList<String> {\n    return Gson().fromJson(this, object : TypeToken<ArrayList<String>>() {}.type)\n}\n\nfun String.surroundWithBrackets(): String {\n    return \"[$this]\"\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/FileExplorerGlideModule.java",
    "content": "package com.raival.fileexplorer.glide;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\n\nimport com.bumptech.glide.Glide;\nimport com.bumptech.glide.Registry;\nimport com.bumptech.glide.annotation.GlideModule;\nimport com.bumptech.glide.module.AppGlideModule;\nimport com.raival.fileexplorer.glide.apk.ApkIconModelLoaderFactory;\nimport com.raival.fileexplorer.glide.icon.IconModelLoaderFactory;\nimport com.raival.fileexplorer.glide.model.IconRes;\n\n@GlideModule\npublic class FileExplorerGlideModule extends AppGlideModule {\n    @Override\n    public void registerComponents(@NonNull Context context, @NonNull Glide glide, Registry registry) {\n        registry.prepend(String.class, Drawable.class, new ApkIconModelLoaderFactory(context));\n        registry.prepend(IconRes.class, Drawable.class, new IconModelLoaderFactory(context));\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/apk/ApkIconDataFetcher.java",
    "content": "package com.raival.fileexplorer.glide.apk;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\nimport androidx.core.content.ContextCompat;\n\nimport com.bumptech.glide.Priority;\nimport com.bumptech.glide.load.DataSource;\nimport com.bumptech.glide.load.data.DataFetcher;\nimport com.raival.fileexplorer.R;\nimport com.raival.fileexplorer.tab.file.misc.FileUtils;\n\nimport java.io.File;\n\npublic class ApkIconDataFetcher implements DataFetcher<Drawable> {\n\n    private final Context context;\n    private final String model;\n\n    public ApkIconDataFetcher(Context context, String model) {\n        this.context = context;\n        this.model = model;\n    }\n\n    @Override\n    public void loadData(@NonNull Priority priority, @NonNull DataCallback<? super Drawable> callback) {\n        Drawable apkIcon = FileUtils.INSTANCE.getApkIcon(new File(model));\n        if (apkIcon == null)\n            apkIcon = ContextCompat.getDrawable(context, R.drawable.unknown_file_extension);\n        callback.onDataReady(apkIcon);\n    }\n\n    @Override\n    public void cleanup() {\n        // Intentionally empty only because we're not opening an InputStream or another I/O resource!\n    }\n\n    @Override\n    public void cancel() {\n        // No cancellation procedure\n    }\n\n    @NonNull\n    @Override\n    public Class<Drawable> getDataClass() {\n        return Drawable.class;\n    }\n\n    @NonNull\n    @Override\n    public DataSource getDataSource() {\n        return DataSource.LOCAL;\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/apk/ApkIconModelLoader.java",
    "content": "package com.raival.fileexplorer.glide.apk;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.bumptech.glide.load.Options;\nimport com.bumptech.glide.load.model.ModelLoader;\nimport com.bumptech.glide.signature.ObjectKey;\nimport com.raival.fileexplorer.tab.file.misc.FileMimeTypes;\n\nimport java.util.Locale;\n\npublic class ApkIconModelLoader implements ModelLoader<String, Drawable> {\n\n    private final Context context;\n\n    public ApkIconModelLoader(Context context) {\n        this.context = context;\n    }\n\n    @Nullable\n    @Override\n    public LoadData<Drawable> buildLoadData(@NonNull String s, int width, int height, @NonNull Options options) {\n        return new LoadData<>(new ObjectKey(s), new ApkIconDataFetcher(context, s));\n    }\n\n    @Override\n    public boolean handles(String s) {\n        return s.toLowerCase(Locale.ROOT).endsWith(FileMimeTypes.apkType);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/apk/ApkIconModelLoaderFactory.java",
    "content": "package com.raival.fileexplorer.glide.apk;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\n\nimport com.bumptech.glide.load.model.ModelLoader;\nimport com.bumptech.glide.load.model.ModelLoaderFactory;\nimport com.bumptech.glide.load.model.MultiModelLoaderFactory;\n\npublic class ApkIconModelLoaderFactory implements ModelLoaderFactory<String, Drawable> {\n\n    private final Context context;\n\n    public ApkIconModelLoaderFactory(Context context) {\n        this.context = context;\n    }\n\n    @NonNull\n    @Override\n    public ModelLoader<String, Drawable> build(@NonNull MultiModelLoaderFactory multiFactory) {\n        return new ApkIconModelLoader(context);\n    }\n\n    @Override\n    public void teardown() {\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/icon/IconDataFetcher.java",
    "content": "package com.raival.fileexplorer.glide.icon;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\nimport androidx.core.content.ContextCompat;\n\nimport com.bumptech.glide.Priority;\nimport com.bumptech.glide.load.DataSource;\nimport com.bumptech.glide.load.data.DataFetcher;\nimport com.raival.fileexplorer.glide.model.IconRes;\n\npublic class IconDataFetcher implements DataFetcher<Drawable> {\n\n    private final Context context;\n    private final IconRes model;\n\n    public IconDataFetcher(Context context, IconRes model) {\n        this.context = context;\n        this.model = model;\n    }\n\n    @Override\n    public void loadData(@NonNull Priority priority, @NonNull DataCallback<? super Drawable> callback) {\n        Context ctx = (model.getContext() != null) ? model.getContext() : context;\n        Drawable drawable = ContextCompat.getDrawable(ctx, model.getResId());\n        callback.onDataReady(drawable);\n    }\n\n    @Override\n    public void cleanup() {\n        // Intentionally empty only because we're not opening an InputStream or another I/O resource!\n    }\n\n    @Override\n    public void cancel() {\n        // No cancellation procedure\n    }\n\n    @NonNull\n    @Override\n    public Class<Drawable> getDataClass() {\n        return Drawable.class;\n    }\n\n    @NonNull\n    @Override\n    public DataSource getDataSource() {\n        return DataSource.LOCAL;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/icon/IconModelLoader.java",
    "content": "package com.raival.fileexplorer.glide.icon;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport com.bumptech.glide.load.Options;\nimport com.bumptech.glide.load.model.ModelLoader;\nimport com.bumptech.glide.signature.ObjectKey;\nimport com.raival.fileexplorer.glide.model.IconRes;\n\npublic class IconModelLoader implements ModelLoader<IconRes, Drawable> {\n\n    private final Context context;\n\n    public IconModelLoader(Context context) {\n        this.context = context;\n    }\n\n    @Nullable\n    @Override\n    public LoadData<Drawable> buildLoadData(@NonNull IconRes s, int width, int height, @NonNull Options options) {\n        return new LoadData<>(new ObjectKey(s), new IconDataFetcher(context, s));\n    }\n\n    @Override\n    public boolean handles(@NonNull IconRes s) {\n        return true;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/icon/IconModelLoaderFactory.java",
    "content": "package com.raival.fileexplorer.glide.icon;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\n\nimport androidx.annotation.NonNull;\n\nimport com.bumptech.glide.load.model.ModelLoader;\nimport com.bumptech.glide.load.model.ModelLoaderFactory;\nimport com.bumptech.glide.load.model.MultiModelLoaderFactory;\nimport com.raival.fileexplorer.glide.model.IconRes;\n\npublic class IconModelLoaderFactory implements ModelLoaderFactory<IconRes, Drawable> {\n\n    private final Context context;\n\n    public IconModelLoaderFactory(Context context) {\n        this.context = context;\n    }\n\n    @NonNull\n    @Override\n    public ModelLoader<IconRes, Drawable> build(@NonNull MultiModelLoaderFactory multiFactory) {\n        return new IconModelLoader(context);\n    }\n\n    @Override\n    public void teardown() {\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/glide/model/IconRes.kt",
    "content": "package com.raival.fileexplorer.glide.model\n\nimport android.content.Context\n\nclass IconRes(val resId: Int, val context: Context? = null)"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/BaseDataHolder.kt",
    "content": "package com.raival.fileexplorer.tab\n\nabstract class BaseDataHolder {\n    abstract val tag: String\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/BaseTabFragment.kt",
    "content": "package com.raival.fileexplorer.tab\n\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.ViewModelProvider\nimport com.google.android.material.appbar.MaterialToolbar\nimport com.raival.fileexplorer.activity.MainActivity\nimport com.raival.fileexplorer.activity.model.MainViewModel\nimport com.raival.fileexplorer.common.view.BottomBarView\nimport com.raival.fileexplorer.common.view.TabView\n\n/**\n * Each TabFragment must handle the creation of its DataHolder and the related TabView using\n * the provided APIs or custom ones.\n */\nabstract class BaseTabFragment : Fragment() {\n    var mainViewModel: MainViewModel? = null\n        get() {\n            if (field == null) {\n                field = ViewModelProvider(requireActivity()).get(MainViewModel::class.java)\n            }\n            return field\n        }\n        private set\n\n    var bottomBarView: BottomBarView? = null\n        get() {\n            if (field == null) field = (requireActivity() as MainActivity).bottomBarView\n            return field\n        }\n        private set\n\n    var toolbar: MaterialToolbar? = null\n        get() {\n            if (field == null) field = (requireActivity() as MainActivity).toolbar\n            return field\n        }\n        private set\n\n    private var tabView: TabView.Tab? = null\n\n    var dataHolder: BaseDataHolder? = null\n        get() {\n            if (field == null && mainViewModel!!.getDataHolder(tag!!).also { field = it } == null) {\n                field = createNewDataHolder()\n                mainViewModel!!.addDataHolder(field!!)\n            }\n            return field\n        }\n        private set\n\n    abstract fun onBackPressed(): Boolean\n    abstract fun createNewDataHolder(): BaseDataHolder\n\n    fun getTabView(): TabView.Tab? {\n        if (tabView == null && (requireActivity() as MainActivity).tabView.getTabByTag(tag)\n                .also { tabView = it } == null\n        ) {\n            tabView = (requireActivity() as MainActivity).tabView.addNewTab(tag!!)\n            // set Default name\n            tabView!!.setName(\"Untitled\")\n        }\n        return tabView\n    }\n\n    open fun closeTab() {\n        mainViewModel!!.getDataHolders()\n            .removeIf { dataHolder1: BaseDataHolder -> dataHolder1.tag == tag }\n        (requireActivity() as MainActivity).closeTab(tag!!)\n    }\n\n    override fun onResume() {\n        super.onResume()\n        // create TabView if necessary (important when a tab fragment doesn't update its TabView)\n        getTabView()\n    }\n\n    companion object {\n        const val DEFAULT_TAB_FRAGMENT_PREFIX = \"0_FileExplorerTabFragment_\"\n        const val FILE_EXPLORER_TAB_FRAGMENT_PREFIX = \"FileExplorerTabFragment_\"\n        const val APPS_TAB_FRAGMENT_PREFIX = \"AppsTabFragment_\"\n        const val ARCHIVE_TAB_FRAGMENT_PREFIX = \"ArchiveTabFragment_\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/apps/AppsTabDataHolder.kt",
    "content": "package com.raival.fileexplorer.tab.apps\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle.MutableLiveData\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.apps.model.Apk\nimport com.raival.fileexplorer.tab.apps.resolver.ApkResolver\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\n\nclass AppsTabDataHolder(override val tag: String) : BaseDataHolder() {\n    private val apps = MutableLiveData<ArrayList<Apk>>()\n\n    fun getApps(showSystemApps: Boolean, sortNewerFirst: Boolean): LiveData<ArrayList<Apk>> {\n        if (apps.value == null) {\n            loadApps(showSystemApps, sortNewerFirst)\n        }\n        return apps\n    }\n\n    fun updateAppsList(showSystemApps: Boolean, sortNewerFirst: Boolean) {\n        loadApps(showSystemApps, sortNewerFirst)\n    }\n\n    private fun loadApps(showSystemApps: Boolean, sortNewerFirst: Boolean) {\n        CoroutineScope(Dispatchers.IO).launch {\n            val apks = ApkResolver().load(showSystemApps, sortNewerFirst).get()\n            withContext(Dispatchers.Main) { apps.setValue(apks) }\n        }.start()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/apps/AppsTabFragment.kt",
    "content": "package com.raival.fileexplorer.tab.apps\n\nimport android.annotation.SuppressLint\nimport android.os.Bundle\nimport android.view.Gravity\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.CompoundButton\nimport android.widget.LinearLayout\nimport android.widget.Space\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.checkbox.MaterialCheckBox\nimport com.google.android.material.progressindicator.CircularProgressIndicator\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.BaseTabFragment\nimport com.raival.fileexplorer.tab.apps.adapter.AppListAdapter\nimport com.raival.fileexplorer.tab.apps.model.Apk\n\nclass AppsTabFragment : BaseTabFragment() {\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var progressIndicator: CircularProgressIndicator\n    private lateinit var showSystemApps: MaterialCheckBox\n    private lateinit var sortApps: MaterialCheckBox\n\n    override fun onBackPressed(): Boolean {\n        super.closeTab()\n        return true\n    }\n\n    override fun createNewDataHolder(): BaseDataHolder {\n        return AppsTabDataHolder(tag!!)\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater, container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        val view = inflater.inflate(R.layout.apps_tab_fragment, container, false)\n        recyclerView = view.findViewById(R.id.rv)\n        progressIndicator = view.findViewById(R.id.progress)\n        return view\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        prepareBottomBarView()\n        (dataHolder as AppsTabDataHolder).getApps(showSystemApps = false, sortNewerFirst = true)\n            .observe(viewLifecycleOwner) { list: ArrayList<Apk> ->\n                recyclerView.adapter = AppListAdapter(list, this)\n                progressIndicator.visibility = View.GONE\n                recyclerView.visibility = View.VISIBLE\n                showSystemApps.isEnabled = true\n                sortApps.isEnabled = true\n            }\n        getTabView()!!.setName(\"Apps\")\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun prepareBottomBarView() {\n        bottomBarView!!.clear()\n        bottomBarView!!.addView(Space(requireActivity()), LinearLayout.LayoutParams(0, 0, 1f))\n\n        showSystemApps = MaterialCheckBox(requireActivity()).apply {\n            layoutParams = LinearLayout.LayoutParams(-2, -1, 1f)\n            text = \"System Apps\"\n            gravity = Gravity.CENTER_VERTICAL\n            setOnCheckedChangeListener { _: CompoundButton?, _: Boolean ->\n                (dataHolder as AppsTabDataHolder).updateAppsList(\n                    showSystemApps.isChecked, sortApps.isChecked\n                )\n                progressIndicator.visibility = View.VISIBLE\n                recyclerView.visibility = View.GONE\n                showSystemApps.isEnabled = false\n                sortApps.isEnabled = false\n            }\n        }\n\n        bottomBarView!!.addItem(\"Show System Apps\", showSystemApps)\n        bottomBarView!!.addView(Space(requireActivity()), LinearLayout.LayoutParams(0, 0, 1f))\n\n        sortApps = MaterialCheckBox(requireActivity()).apply {\n            layoutParams = LinearLayout.LayoutParams(-2, -1, 1f)\n            text = \"Newer First\"\n            gravity = Gravity.CENTER_VERTICAL\n            isChecked = true\n            setOnCheckedChangeListener { _: CompoundButton?, _: Boolean ->\n                (dataHolder as AppsTabDataHolder).updateAppsList(\n                    showSystemApps.isChecked, sortApps.isChecked\n                )\n                progressIndicator.visibility = View.VISIBLE\n                recyclerView.visibility = View.GONE\n                showSystemApps.isEnabled = false\n                sortApps.isEnabled = false\n            }\n        }\n\n        bottomBarView!!.addItem(\"Sort Apps\", sortApps)\n        bottomBarView!!.addView(Space(requireActivity()), LinearLayout.LayoutParams(0, 0, 1f))\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/apps/adapter/AppListAdapter.kt",
    "content": "package com.raival.fileexplorer.tab.apps.adapter\n\nimport android.annotation.SuppressLint\nimport android.os.Environment\nimport android.os.Handler\nimport android.os.Looper\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.common.BackgroundTask\nimport com.raival.fileexplorer.tab.apps.AppsTabFragment\nimport com.raival.fileexplorer.tab.apps.model.Apk\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport java.io.File\nimport java.util.concurrent.atomic.AtomicBoolean\n\nopen class AppListAdapter(private val list: ArrayList<Apk>, private val fragment: AppsTabFragment) :\n    RecyclerView.Adapter<AppListAdapter.ViewHolder>() {\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        @SuppressLint(\"InflateParams\") val view =\n            fragment.layoutInflater.inflate(R.layout.apps_tab_app_item, null)\n        view.layoutParams = RecyclerView.LayoutParams(\n            ViewGroup.LayoutParams.MATCH_PARENT,\n            ViewGroup.LayoutParams.WRAP_CONTENT\n        )\n        return ViewHolder(view)\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        holder.bind()\n    }\n\n    override fun getItemCount(): Int {\n        return list.size\n    }\n\n    private fun showSaveDialog(file: Apk) {\n        MaterialAlertDialogBuilder(fragment.requireContext())\n            .setIcon(file.icon)\n            .setTitle(file.name)\n            .setMessage(\"Do you want to save this app to Download folder?\")\n            .setPositiveButton(\"Yes\") { _, _ -> saveApkFile(file) }\n            .setNegativeButton(\"No\", null)\n            .show()\n    }\n\n    private fun saveApkFile(file: Apk) {\n        val backgroundTask = BackgroundTask()\n        val error = AtomicBoolean(false)\n        backgroundTask.setTasks({\n            backgroundTask.showProgressDialog(\n                \"Copying...\",\n                fragment.requireActivity()\n            )\n        }, {\n            try {\n                FileUtils.copyFile(\n                    file.source,\n                    file.name + \".apk\",\n                    File(\n                        Environment.getExternalStorageDirectory(),\n                        Environment.DIRECTORY_DOWNLOADS\n                    ),\n                    true\n                )\n            } catch (e: Exception) {\n                error.set(true)\n                e.printStackTrace()\n                Handler(Looper.getMainLooper()).post { showMsg(e.toString()) }\n            }\n        }) {\n            if (!error.get()) showMsg(\"APK file has been saved in \" + \"/Downloads/\" + file.name)\n            backgroundTask.dismiss()\n        }\n        backgroundTask.run()\n    }\n\n    inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        var icon: ImageView\n        var name: TextView\n        var pkg: TextView\n        var details: TextView\n\n        init {\n            icon = itemView.findViewById(R.id.app_icon)\n            name = itemView.findViewById(R.id.app_name)\n            pkg = itemView.findViewById(R.id.app_pkg)\n            details = itemView.findViewById(R.id.app_details)\n        }\n\n        fun bind() {\n            val position = adapterPosition\n            val apk = list[position]\n            name.text = apk.name\n            pkg.text = apk.pkg\n            details.text = apk.size\n            icon.setImageDrawable(apk.icon)\n            itemView.findViewById<View>(R.id.background)\n                .setOnClickListener { showSaveDialog(apk) }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/apps/model/Apk.kt",
    "content": "package com.raival.fileexplorer.tab.apps.model\n\nimport android.graphics.drawable.Drawable\nimport java.io.File\n\nclass Apk(\n    val name: String,\n    val pkg: String,\n    val size: String,\n    val icon: Drawable,\n    val lastModified: Long,\n    val source: File\n)"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/apps/resolver/ApkResolver.kt",
    "content": "package com.raival.fileexplorer.tab.apps.resolver\n\nimport android.annotation.SuppressLint\nimport android.content.pm.ApplicationInfo\nimport android.content.pm.PackageInfo\nimport android.content.pm.PackageManager\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.extension.toFormattedSize\nimport com.raival.fileexplorer.tab.apps.model.Apk\nimport java.io.File\n\nclass ApkResolver {\n    private val list = ArrayList<Apk>()\n    private var sortApps = false\n\n    @SuppressLint(\"PackageManagerGetSignatures\")\n    fun load(showSystemApps: Boolean, sortNewerFirst: Boolean): ApkResolver {\n        list.clear()\n        sortApps = sortNewerFirst\n        val pm = App.appContext.packageManager\n        val apps = pm.getInstalledApplications(\n            PackageManager.MATCH_UNINSTALLED_PACKAGES\n                    or PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS\n        )\n\n        var androidInfo: PackageInfo? = null\n        try {\n            androidInfo = pm.getPackageInfo(\"android\", PackageManager.GET_SIGNATURES)\n        } catch (ignored: PackageManager.NameNotFoundException) {\n        }\n        for (info in apps) {\n            if (info.sourceDir == null) {\n                continue\n            }\n            val pkgInfo: PackageInfo? = try {\n                pm.getPackageInfo(info.packageName, PackageManager.GET_SIGNATURES)\n            } catch (e: PackageManager.NameNotFoundException) {\n                null\n            }\n\n            val isSystemApp = isAppInSystemPartition(info) || isSignedBySystem(pkgInfo, androidInfo)\n            if (isSystemApp && !showSystemApps) continue\n\n            val apk = Apk(\n                pm.getApplicationLabel(info).toString(),\n                info.packageName,\n                File(info.publicSourceDir).length().toFormattedSize(),\n                info.loadIcon(pm),\n                File(info.publicSourceDir).lastModified(),\n                File(info.publicSourceDir)\n            )\n            list.add(apk)\n        }\n        return this\n    }\n\n    fun get(): ArrayList<Apk> {\n        if (sortApps) list.sortWith { apk1: Apk, apk2: Apk ->\n            apk2.lastModified.compareTo(apk1.lastModified)\n        }\n        return list\n    }\n\n    private fun isSignedBySystem(piApp: PackageInfo?, piSys: PackageInfo?): Boolean {\n        return piApp != null && piSys != null && piApp.signatures != null && piSys.signatures[0] == piApp.signatures[0]\n    }\n\n    companion object {\n        fun isAppInSystemPartition(applicationInfo: ApplicationInfo): Boolean {\n            return ((applicationInfo.flags\n                    and (ApplicationInfo.FLAG_SYSTEM or ApplicationInfo.FLAG_UPDATED_SYSTEM_APP))\n                    != 0)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/FileExplorerTabDataHolder.kt",
    "content": "package com.raival.fileexplorer.tab.file\n\nimport android.os.Parcelable\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.file.model.FileItem\nimport java.io.File\n\nclass FileExplorerTabDataHolder(override val tag: String) : BaseDataHolder() {\n    @JvmField\n    var activeDirectory: File? = null\n\n    @JvmField\n    var recyclerViewStates: HashMap<File, Parcelable> = HashMap()\n    var searchList = ArrayList<FileItem>()\n\n    @JvmField\n    var selectedFiles = ArrayList<File>()\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/FileExplorerTabFragment.kt",
    "content": "package com.raival.fileexplorer.tab.file\n\nimport android.annotation.SuppressLint\nimport android.os.Bundle\nimport android.os.Environment\nimport android.view.LayoutInflater\nimport android.view.MenuItem\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.HorizontalScrollView\nimport android.widget.LinearLayout\nimport androidx.appcompat.widget.PopupMenu\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.chip.Chip\nimport com.google.android.material.chip.ChipGroup\nimport com.google.android.material.textview.MaterialTextView\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.MainActivity\nimport com.raival.fileexplorer.common.dialog.CustomDialog\nimport com.raival.fileexplorer.extension.getFormattedFileCount\nimport com.raival.fileexplorer.extension.getShortLabel\nimport com.raival.fileexplorer.extension.toDp\nimport com.raival.fileexplorer.tab.BaseDataHolder\nimport com.raival.fileexplorer.tab.BaseTabFragment\nimport com.raival.fileexplorer.tab.file.adapter.FileListAdapter\nimport com.raival.fileexplorer.tab.file.adapter.PathHistoryAdapter\nimport com.raival.fileexplorer.tab.file.dialog.SearchDialog\nimport com.raival.fileexplorer.tab.file.dialog.TasksDialog\nimport com.raival.fileexplorer.tab.file.misc.FileOpener\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.tab.file.model.FileItem\nimport com.raival.fileexplorer.tab.file.options.FileOptionsHandler\nimport com.raival.fileexplorer.util.Log\nimport com.raival.fileexplorer.util.PrefsUtils\nimport java.io.File\nimport java.io.IOException\nimport java.util.*\n\nclass FileExplorerTabFragment : BaseTabFragment {\n    val files = ArrayList<FileItem>()\n    var pathHistory = ArrayList<File>()\n\n    private lateinit var fileList: RecyclerView\n    private lateinit var pathHistoryRv: RecyclerView\n    private lateinit var placeHolder: View\n    private lateinit var fileOptionsHandler: FileOptionsHandler\n    private var requireRefresh = false\n    var previousDirectory: File? = null\n\n    @JvmField\n    var currentDirectory: File? = null\n\n    constructor() : super()\n    constructor(directory: File) : super() {\n        currentDirectory = directory\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater, container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        val view = inflater.inflate(R.layout.file_explorer_tab_fragment, container, false)\n        fileList = view.findViewById(R.id.rv)\n        pathHistoryRv = view.findViewById(R.id.path_history)\n        placeHolder = view.findViewById(R.id.place_holder)\n        val homeButton = view.findViewById<View>(R.id.home)\n        homeButton.setOnClickListener {\n            setCurrentDirectory(defaultHomeDirectory)\n        }\n        homeButton.setOnLongClickListener { showSetPathDialog() }\n        return view\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        prepareBottomBarView()\n        initFileList()\n        loadData()\n        // restore RecyclerView state\n        restoreRecyclerViewState()\n    }\n\n    private fun loadData() {\n        setCurrentDirectory((dataHolder as FileExplorerTabDataHolder).activeDirectory!!)\n    }\n\n    private fun prepareBottomBarView() {\n        bottomBarView!!.clear()\n        bottomBarView!!.addItem(\"Tasks\", R.drawable.ic_baseline_assignment_24) {\n            TasksDialog(this).show(\n                parentFragmentManager, \"\"\n            )\n        }\n        bottomBarView!!.addItem(\"Search\", R.drawable.ic_round_search_24) {\n            val searchFragment = SearchDialog(this, currentDirectory!!)\n            searchFragment.show(parentFragmentManager, \"\")\n            setSelectAll(false)\n        }\n        bottomBarView!!.addItem(\n            \"Create\",\n            R.drawable.ic_baseline_add_24\n        ) { showAddNewFileDialog() }\n        bottomBarView!!.addItem(\n            \"Sort\",\n            R.drawable.ic_baseline_sort_24\n        ) { view: View -> showSortOptionsMenu(view) }\n        bottomBarView!!.addItem(\n            \"Select All\",\n            R.drawable.ic_baseline_select_all_24\n        ) { setSelectAll(true) }\n        bottomBarView!!.addItem(\n            \"refresh\",\n            R.drawable.ic_baseline_restart_alt_24\n        ) { refresh() }\n    }\n\n    private fun showSortOptionsMenu(view: View) {\n        val popupMenu = PopupMenu(requireActivity(), view)\n        popupMenu.menu.add(\"Sort by:\").isEnabled = false\n        popupMenu.menu.add(\"Name (A-Z)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_NAME_A2Z\n        popupMenu.menu.add(\"Name (Z-A)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_NAME_Z2A\n        popupMenu.menu.add(\"Size (Bigger)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_SIZE_BIGGER\n        popupMenu.menu.add(\"Size (Smaller)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_SIZE_SMALLER\n        popupMenu.menu.add(\"Date (Newer)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_DATE_NEWER\n        popupMenu.menu.add(\"Date (Older)\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.sortingMethod == PrefsUtils.SORT_DATE_OLDER\n        popupMenu.menu.add(\"Other options:\").isEnabled = false\n        popupMenu.menu.add(\"Folders first\").setCheckable(true).isChecked =\n            PrefsUtils.FileExplorerTab.listFoldersFirst()\n        popupMenu.setOnMenuItemClickListener { menuItem: MenuItem ->\n            menuItem.isChecked = !menuItem.isChecked\n            when (menuItem.title.toString()) {\n                \"Name (A-Z)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_NAME_A2Z\n                }\n                \"Name (Z-A)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_NAME_Z2A\n                }\n                \"Size (Bigger)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_SIZE_BIGGER\n                }\n                \"Size (Smaller)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_SIZE_SMALLER\n                }\n                \"Date (Older)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_DATE_OLDER\n                }\n                \"Date (Newer)\" -> {\n                    PrefsUtils.FileExplorerTab.sortingMethod = PrefsUtils.SORT_DATE_NEWER\n                }\n                \"Folders first\" -> {\n                    PrefsUtils.FileExplorerTab.setListFoldersFirst(menuItem.isChecked)\n                }\n            }\n            refresh()\n            true\n        }\n        popupMenu.show()\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun showSetPathDialog(): Boolean {\n        val customDialog = CustomDialog()\n        val input = customDialog.createInput(requireActivity(), \"e.g. /sdcard/...\")\n        input.editText?.setSingleLine()\n        val textView = MaterialTextView(requireContext())\n        textView.setPadding(0, 8.toDp(), 0, 0)\n        textView.alpha = 0.7f\n        textView.text = \"Quick Links:\"\n        val layout = ChipGroup(requireContext()).apply {\n            isScrollContainer = true\n        }\n\n        // Chips\n        layout.addView(createChip(\"Internal Storage\") {\n            setCurrentDirectory(\n                defaultHomeDirectory\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Downloads\") {\n            setCurrentDirectory(\n                Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Documents\") {\n            setCurrentDirectory(\n                Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"DCIM\") {\n            setCurrentDirectory(\n                Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)\n            )\n            customDialog.dismiss()\n        })\n\n        layout.addView(createChip(\"Music\") {\n            setCurrentDirectory(\n                Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)\n            )\n            customDialog.dismiss()\n        })\n\n        customDialog.setTitle(\"Jump to path\")\n            .addView(input)\n            .addView(textView)\n            .addView(HorizontalScrollView(requireContext()).apply {\n                layoutParams = LinearLayout.LayoutParams(\n                    LinearLayout.LayoutParams.MATCH_PARENT,\n                    LinearLayout.LayoutParams.WRAP_CONTENT\n                )\n                addView(layout)\n            })\n            .setPositiveButton(\"Go\", {\n                val file = File(\n                    input.editText!!.text.toString()\n                )\n                if (file.exists()) {\n                    if (file.canRead()) {\n                        if (file.isFile) {\n                            FileOpener(requireActivity() as MainActivity).openFile(file)\n                        } else {\n                            setCurrentDirectory(file)\n                        }\n                    } else {\n                        showMsg(Log.UNABLE_TO + \" read the provided file\")\n                    }\n                } else {\n                    showMsg(\"The destination path doesn't exist!\")\n                }\n            }, true)\n            .show(parentFragmentManager, \"\")\n        return true\n    }\n\n    private fun createChip(title: String, onClick: () -> Unit): View {\n        return Chip(requireContext()).apply {\n            layoutParams = LinearLayout.LayoutParams(\n                ViewGroup.LayoutParams.WRAP_CONTENT,\n                ViewGroup.LayoutParams.WRAP_CONTENT\n            )\n            text = title\n            setOnClickListener {\n                onClick.invoke()\n            }\n        }\n    }\n\n    private fun showAddNewFileDialog() {\n        val customDialog = CustomDialog()\n        val input = customDialog.createInput(requireActivity(), \"File name\")\n\n        input.editText?.setSingleLine()\n        FileUtils.setFileValidator(input, currentDirectory!!)\n        CustomDialog()\n            .setTitle(\"Create new file\")\n            .addView(input)\n            .setPositiveButton(\"File\", {\n                createFile(\n                    input.editText!!.text.toString(), false\n                )\n            }, true)\n            .setNegativeButton(\"Folder\", {\n                createFile(\n                    input.editText!!.text.toString(), true\n                )\n            }, true)\n            .setNeutralButton(\"Cancel\", null, true)\n            .show(parentFragmentManager, \"\")\n    }\n\n    private fun createFile(name: String, isFolder: Boolean) {\n        val file = File(currentDirectory, name)\n        if (isFolder) {\n            if (!file.mkdir()) {\n                showMsg(Log.UNABLE_TO + \" create folder: \" + file.absolutePath)\n            } else {\n                refresh()\n                focusOn(file)\n            }\n        } else {\n            try {\n                if (!file.createNewFile()) {\n                    showMsg(Log.UNABLE_TO + \" \" + FileUtils.CREATE_FILE + \": \" + file.absolutePath)\n                } else {\n                    refresh()\n                    focusOn(file)\n                }\n            } catch (e: IOException) {\n                Log.e(TAG, e)\n                showMsg(e.toString())\n            }\n        }\n    }\n\n    override fun closeTab() {\n        // Close the tab (if not default tab)\n        if (tag != null && !tag!!.startsWith(\"0_\")) {\n            super.closeTab()\n        }\n    }\n\n    override fun onBackPressed(): Boolean {\n        //  Unselect selected files (if any)\n        if (selectedFiles.size > 0) {\n            setSelectAll(false)\n            return true\n        }\n        // Go back if possible\n        val parent = currentDirectory?.parentFile\n        if (parent != null && parent.exists() && parent.canRead()) {\n            setCurrentDirectory(currentDirectory?.parentFile!!)\n            // restore RecyclerView state\n            restoreRecyclerViewState()\n            // Clear any selected files from the DataHolder (it also gets cleared\n            // when a FileItem is clicked)\n            (dataHolder as FileExplorerTabDataHolder).selectedFiles.clear()\n            return true\n        }\n        // Close the tab (if not default tab)\n        if (tag != null && !tag!!.startsWith(\"0_\")) {\n            closeTab()\n            return true\n        }\n        return false\n    }\n\n    override fun createNewDataHolder(): BaseDataHolder {\n        val dataHolder = FileExplorerTabDataHolder(tag!!)\n        dataHolder.activeDirectory =\n            if (currentDirectory == null) defaultHomeDirectory else currentDirectory\n        return dataHolder\n    }\n\n    override fun onStop() {\n        super.onStop()\n        requireRefresh = true\n    }\n\n    override fun onPause() {\n        super.onPause()\n        requireRefresh = true\n    }\n\n    override fun onResume() {\n        super.onResume()\n        if (requireRefresh) {\n            requireRefresh = false\n            refresh()\n        }\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    fun setSelectAll(select: Boolean) {\n        if (!select) (dataHolder as FileExplorerTabDataHolder).selectedFiles.clear()\n        for (item in files) {\n            item.isSelected = select\n            if (select) {\n                (dataHolder as FileExplorerTabDataHolder).selectedFiles.add(item.file)\n            }\n        }\n        // Don't call refresh(), because it will recreate the tab and reset the selection\n        fileList.adapter?.notifyDataSetChanged()\n    }\n\n    val selectedFiles: ArrayList<FileItem>\n        get() {\n            val list = ArrayList<FileItem>()\n            for (item in files) {\n                if (item.isSelected) list.add(item)\n            }\n            return list\n        }\n\n    /**\n     * Show/Hide placeholder\n     */\n    fun showPlaceholder(isShow: Boolean) {\n        placeHolder.visibility = if (isShow) View.VISIBLE else View.GONE\n    }\n\n    /**\n     * Used to update the title of attached tabView\n     */\n    private fun updateTabTitle() {\n        getTabView()!!.setName(name)\n    }\n\n    /**\n     * This method is called once from #onViewCreated(View, Bundle)\n     */\n    private fun initFileList() {\n        fileList.adapter = FileListAdapter(this)\n        fileList.setHasFixedSize(true)\n        initPathHistory()\n    }\n\n    private fun initPathHistory() {\n        pathHistoryRv.layoutManager =\n            LinearLayoutManager(requireActivity(), LinearLayoutManager.HORIZONTAL, false)\n        pathHistoryRv.adapter = PathHistoryAdapter(this)\n    }\n\n    /**\n     * RecyclerView state should be saved when the fragment is destroyed and recreated.\n     * #getDataHolder() isn't used here because we don't want to create a new DataHolder if the fragment is about\n     * to close (note that the DataHolder gets removed just right before the fragment is closed)\n     */\n    override fun onDestroy() {\n        super.onDestroy()\n        val fileExplorerTabDataHolder = mainViewModel!!.getDataHolder(\n            tag!!\n        ) as FileExplorerTabDataHolder?\n        fileExplorerTabDataHolder?.recyclerViewStates?.put(\n            currentDirectory!!, fileList.layoutManager!!\n                .onSaveInstanceState()!!\n        )\n    }\n\n    /**\n     * This method handles the following (in order):\n     * - Updating currentDirectory and previousDirectory fields\n     * - Updating recyclerViewStates in DataHolder\n     * - Sorting files based on the preferences\n     * - Updating tabView title\n     * - Update pathHistory list\n     * - Refreshing adapters (fileList & pathHistory)\n     * - Updating activeDirectory in DataHolder\n     *\n     * @param file the directory to open\n     */\n    fun setCurrentDirectory(file: File) {\n        if (currentDirectory != null) previousDirectory = currentDirectory\n        currentDirectory = file\n        // Save only when previousDirectory is set (so that it can restore the state before onDestroy())\n        if (previousDirectory != null) (dataHolder as FileExplorerTabDataHolder).recyclerViewStates[previousDirectory!!] =\n            fileList.layoutManager!!\n                .onSaveInstanceState()!!\n        prepareFiles()\n        updateTabTitle()\n        updatePathHistoryList()\n        refreshFileList()\n        (dataHolder as FileExplorerTabDataHolder).activeDirectory = currentDirectory\n    }\n\n    /**\n     * This method automatically removes the restored state from DataHolder recyclerViewStates\n     * This method is called when:\n     * - Create the fragment\n     * - #onBackPressed()\n     * - when select a directory from pathHistory RecyclerView\n     */\n    fun restoreRecyclerViewState() {\n        val savedState =\n            (dataHolder as FileExplorerTabDataHolder).recyclerViewStates[currentDirectory]\n        if (savedState != null) {\n            fileList.layoutManager?.onRestoreInstanceState(savedState)\n            (dataHolder as FileExplorerTabDataHolder).recyclerViewStates.remove(currentDirectory)\n        }\n    }\n\n    /**\n     * Refreshes both fileList and pathHistory recyclerview (used by #setCurrentDirectory(File) ONLY)\n     */\n    @SuppressLint(\"NotifyDataSetChanged\")\n    private fun refreshFileList() {\n        fileList.adapter?.notifyDataSetChanged()\n        pathHistoryRv.adapter?.notifyDataSetChanged()\n        pathHistoryRv.scrollToPosition(pathHistoryRv.adapter!!.itemCount - 1)\n        fileList.scrollToPosition(0)\n        if (toolbar != null) toolbar!!.subtitle =\n            currentDirectory?.getFormattedFileCount()\n    }\n\n    /**\n     * Used to refresh the tab\n     */\n    fun refresh() {\n        setCurrentDirectory(currentDirectory!!)\n        restoreRecyclerViewState()\n    }\n\n    private val defaultHomeDirectory: File\n        get() = Environment.getExternalStorageDirectory()\n\n    private fun prepareFiles() {\n        // Make sure current file is ready\n        if (currentDirectory == null) {\n            loadData()\n            return\n        }\n        // Clear previous list\n        files.clear()\n        // Load all files in the current File\n        val files = currentDirectory!!.listFiles()\n        if (files != null) {\n            for (comparator in FileUtils.comparators) {\n                Arrays.sort(files, comparator)\n            }\n            for (file in files) {\n                val fileItem = FileItem(file)\n                if ((dataHolder as FileExplorerTabDataHolder).selectedFiles.contains(fileItem.file)) {\n                    fileItem.isSelected = true\n                }\n                this.files.add(fileItem)\n            }\n        }\n    }\n\n    fun focusOn(file: File) {\n        for (i in files.indices) {\n            if (file == files[i].file) {\n                fileList.scrollToPosition(i)\n                return\n            }\n        }\n    }\n\n    /**\n     * @return the name associated with this tab (currently used for tabView)\n     */\n    val name: String\n        get() = currentDirectory?.getShortLabel(MAX_NAME_LENGTH)!!\n\n    fun showFileOptions(fileItem: FileItem?) {\n        if (!this::fileOptionsHandler.isInitialized) {\n            fileOptionsHandler = FileOptionsHandler(this)\n        }\n        fileOptionsHandler.showOptions(fileItem!!)\n    }\n\n    fun openFile(fileItem: FileItem) {\n        FileOpener(requireActivity() as MainActivity).openFile(fileItem.file)\n    }\n\n    private fun updatePathHistoryList() {\n        val list = ArrayList<File>()\n        var file = currentDirectory\n        while (file != null && file.canRead()) {\n            list.add(file)\n            file = file.parentFile\n        }\n        list.reverse()\n        if (list.size > 0) pathHistory = list\n    }\n\n    companion object {\n        const val MAX_NAME_LENGTH = 26\n        private const val TAG = \"FileExplorerTabFragment\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/adapter/FileListAdapter.kt",
    "content": "package com.raival.fileexplorer.tab.file.adapter\n\nimport android.annotation.SuppressLint\nimport android.graphics.drawable.ColorDrawable\nimport android.text.TextUtils\nimport android.view.View\nimport android.view.View.OnLongClickListener\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.getFileDetails\nimport com.raival.fileexplorer.tab.file.FileExplorerTabDataHolder\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.misc.IconHelper\nimport com.raival.fileexplorer.tab.file.observer.FileListObserver\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\n\nclass FileListAdapter(private val parentFragment: FileExplorerTabFragment) :\n    RecyclerView.Adapter<FileListAdapter.ViewHolder>() {\n\n    private val selectedFileDrawable: ColorDrawable\n    private val highlightedFileDrawable: ColorDrawable\n\n    init {\n        registerAdapterDataObserver(FileListObserver(parentFragment, this))\n        selectedFileDrawable =\n            ColorDrawable(parentFragment.requireContext().getColor(R.color.selectedFileHighlight))\n        highlightedFileDrawable =\n            ColorDrawable(parentFragment.requireContext().getColor(R.color.previousFileHighlight))\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        @SuppressLint(\"InflateParams\") val view =\n            parentFragment.layoutInflater.inflate(R.layout.file_explorer_tab_file_item, null)\n        view.layoutParams = RecyclerView.LayoutParams(\n            ViewGroup.LayoutParams.MATCH_PARENT,\n            ViewGroup.LayoutParams.WRAP_CONTENT\n        )\n        return ViewHolder(view)\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        holder.bind()\n    }\n\n    override fun getItemCount(): Int {\n        return parentFragment.files.size\n    }\n\n    inner class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {\n        var name: TextView\n        var details: TextView\n        var icon: ImageView\n        var background: View\n        private var divider: View\n        private lateinit var prevFile: File\n\n        init {\n            name = v.findViewById(R.id.file_name)\n            details = v.findViewById(R.id.file_details)\n            icon = v.findViewById(R.id.file_icon)\n            background = v.findViewById(R.id.background)\n            divider = v.findViewById(R.id.divider)\n        }\n\n        /**\n         * Update the ui of each item\n         */\n        fun bind() {\n            val position = adapterPosition\n            val fileItem = parentFragment.files[position]\n\n            if (!this::prevFile.isInitialized || !fileItem.file.isDirectory || !prevFile.isDirectory) {\n                IconHelper.setFileIcon(icon, fileItem.file)\n            }\n\n            if (TextUtils.isEmpty(fileItem.name)) {\n                fileItem.name = fileItem.file.name\n            }\n            name.text = fileItem.name\n\n            if (fileItem.details.isEmpty()) {\n                val pos = adapterPosition\n                CoroutineScope(Dispatchers.IO).launch {\n                    fileItem.details = fileItem.file.getFileDetails()\n                    if (position == pos) {\n                        withContext(Dispatchers.Main) {\n                            details.text = fileItem.details\n                        }\n                    }\n                }\n            } else {\n                details.text = fileItem.details\n            }\n            if (position == itemCount - 1) {\n                divider.visibility = View.GONE\n            } else {\n                divider.visibility = View.VISIBLE\n            }\n\n            // Hidden files will be 50% transparent\n            if (fileItem.file.isHidden) {\n                if (icon.alpha == 1f) icon.alpha = 0.5f\n            } else {\n                if (icon.alpha < 1) icon.alpha = 1f\n            }\n\n            // Set a proper background color\n            if (fileItem.isSelected) {\n                if (background.foreground !== selectedFileDrawable) background.foreground =\n                    selectedFileDrawable\n            } else if (parentFragment.previousDirectory != null\n                && fileItem.file.absolutePath == parentFragment.previousDirectory?.absolutePath\n            ) {\n                if (background.foreground !== highlightedFileDrawable) background.foreground =\n                    highlightedFileDrawable\n            } else {\n                if (background.foreground != null) background.foreground = null\n            }\n\n            // Select/unselect item by pressing the icon\n            itemView.findViewById<View>(R.id.icon_container).setOnClickListener {\n                fileItem.isSelected = !fileItem.isSelected\n                if (fileItem.isSelected) {\n                    (parentFragment.dataHolder as FileExplorerTabDataHolder?)!!.selectedFiles.add(\n                        fileItem.file\n                    )\n                } else {\n                    (parentFragment.dataHolder as FileExplorerTabDataHolder?)!!.selectedFiles.remove(\n                        fileItem.file\n                    )\n                }\n                notifyItemChanged(position)\n            }\n\n            // Handle click event\n            background.setOnClickListener {\n                if (fileItem.file.isFile) {\n                    parentFragment.openFile(fileItem)\n                } else {\n                    parentFragment.setCurrentDirectory(fileItem.file)\n                    // Clear any selected files from the DataHolder (it also gets cleared\n                    // in onBackPressed (when go back)\n                    (parentFragment.dataHolder as FileExplorerTabDataHolder?)!!.selectedFiles.clear()\n                }\n            }\n            val longClickListener = OnLongClickListener {\n                parentFragment.showFileOptions(fileItem)\n                true\n            }\n\n            // Apply the listener for both the background and the icon\n            itemView.findViewById<View>(R.id.icon_container)\n                .setOnLongClickListener(longClickListener)\n            background.setOnLongClickListener(longClickListener)\n            prevFile = fileItem.file\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/adapter/PathHistoryAdapter.kt",
    "content": "package com.raival.fileexplorer.tab.file.adapter\n\nimport android.annotation.SuppressLint\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.isExternalStorageFolder\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.dialog.FileInfoDialog\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.util.Utils\n\nclass PathHistoryAdapter(private val parentFragment: FileExplorerTabFragment) :\n    RecyclerView.Adapter<PathHistoryAdapter.ViewHolder>() {\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        @SuppressLint(\"InflateParams\") val v =\n            LayoutInflater.from(parent.context).inflate(\n                R.layout.file_explorer_tab_path_history_view,\n                null\n            )\n        v.layoutParams = ViewGroup.LayoutParams(\n            ViewGroup.LayoutParams.WRAP_CONTENT,\n            ViewGroup.LayoutParams.MATCH_PARENT\n        )\n        return ViewHolder(v)\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        holder.bind()\n    }\n\n    override fun getItemCount(): Int {\n        return parentFragment.pathHistory.size\n    }\n\n    inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        var label: TextView\n        fun bind() {\n            val position = adapterPosition\n            val file = parentFragment.pathHistory[position]\n            label.text =\n                if (file.isExternalStorageFolder()) FileUtils.INTERNAL_STORAGE else file.name\n            label.setTextColor(\n                if (position == itemCount - 1) Utils.getColorAttribute(\n                    R.attr.colorPrimary,\n                    parentFragment.requireActivity()\n                ) else Utils.getColorAttribute(\n                    R.attr.colorOutline,\n                    parentFragment.requireActivity()\n                )\n            )\n            itemView.setOnClickListener {\n                parentFragment.setCurrentDirectory(file)\n                // Restore RecyclerView state\n                parentFragment.restoreRecyclerViewState()\n            }\n            itemView.setOnLongClickListener {\n                FileInfoDialog(file).setUseDefaultFileInfo(true).show(\n                    parentFragment.parentFragmentManager, \"\"\n                )\n                true\n            }\n        }\n\n        init {\n            label = itemView.findViewById(R.id.text)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/dialog/FileInfoDialog.kt",
    "content": "package com.raival.fileexplorer.tab.file.dialog\n\nimport android.annotation.SuppressLint\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.TextView\nimport com.google.android.material.bottomsheet.BottomSheetDialogFragment\nimport com.google.android.material.textfield.TextInputLayout\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.getFolderSize\nimport com.raival.fileexplorer.extension.getFormattedFileCount\nimport com.raival.fileexplorer.extension.getLastModifiedDate\nimport com.raival.fileexplorer.extension.toFormattedSize\nimport com.raival.fileexplorer.tab.file.misc.IconHelper\nimport com.raival.fileexplorer.tab.file.misc.md5.HashUtils\nimport com.raival.fileexplorer.tab.file.misc.md5.MessageDigestAlgorithm\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\nimport java.security.MessageDigest\n\nclass FileInfoDialog(private val file: File) : BottomSheetDialogFragment() {\n    private val infoList = ArrayList<InfoHolder>()\n    private var useDefaultFileInfo = false\n    private lateinit var container: ViewGroup\n\n    fun setUseDefaultFileInfo(`is`: Boolean): FileInfoDialog {\n        useDefaultFileInfo = `is`\n        return this\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        return inflater.inflate(R.layout.file_explorer_tab_info_dialog, container, false)\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        (view.findViewById<View>(R.id.file_name) as TextView).text = file.name\n        IconHelper.setFileIcon(view.findViewById(R.id.file_icon), file)\n        container = view.findViewById(R.id.container)\n        if (!useDefaultFileInfo) {\n            for (holder in infoList) {\n                addItemView(holder, container)\n            }\n        } else {\n            if (file.isFile) {\n                addDefaultFileInfo()\n            } else {\n                addDefaultFolderInfo()\n            }\n        }\n    }\n\n    private fun addDefaultFolderInfo() {\n        addItemView(InfoHolder(\"Path:\", file.absolutePath, true), container)\n        addItemView(\n            InfoHolder(\n                \"Modified:\", file.getLastModifiedDate(), true\n            ), container\n        )\n        val count = addItemView(InfoHolder(\"Content:\", \"Counting...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = file.getFormattedFileCount()\n            withContext(Dispatchers.Main) { count.text = s }\n        }.start()\n        val size = addItemView(InfoHolder(\"Size:\", \"Counting...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = file.getFolderSize().toFormattedSize()\n            withContext(Dispatchers.Main) { size.text = s }\n        }.start()\n    }\n\n    private fun addDefaultFileInfo() {\n        addItemView(InfoHolder(\"Path:\", file.absolutePath, true), container)\n        addItemView(\n            InfoHolder(\n                \"Extension:\", file.extension, true\n            ), container\n        )\n        addItemView(\n            InfoHolder(\n                \"Modified:\", file.getLastModifiedDate(), true\n            ), container\n        )\n        addItemView(\n            InfoHolder(\n                \"Size:\", file.length().toFormattedSize(), true\n            ), container\n        )\n\n        val md5 = addItemView(InfoHolder(\"MD5:\", \"calculating...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = HashUtils.getCheckSumFromFile(\n                MessageDigest.getInstance(MessageDigestAlgorithm.MD5),\n                file\n            )\n            withContext(Dispatchers.Main) { md5.text = s }\n        }.start()\n\n        val sha1 = addItemView(InfoHolder(\"SHA1:\", \"calculating...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = HashUtils.getCheckSumFromFile(\n                MessageDigest.getInstance(MessageDigestAlgorithm.SHA_1),\n                file\n            )\n            withContext(Dispatchers.Main) { sha1.text = s }\n        }.start()\n\n        val sha256 = addItemView(InfoHolder(\"SHA256:\", \"calculating...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = HashUtils.getCheckSumFromFile(\n                MessageDigest.getInstance(MessageDigestAlgorithm.SHA_256),\n                file\n            )\n            withContext(Dispatchers.Main) { sha256.text = s }\n        }.start()\n\n        val sha512 = addItemView(InfoHolder(\"SHA_512:\", \"calculating...\", true), container)\n        CoroutineScope(Dispatchers.IO).launch {\n            val s = HashUtils.getCheckSumFromFile(\n                MessageDigest.getInstance(MessageDigestAlgorithm.SHA_512),\n                file\n            )\n            withContext(Dispatchers.Main) { sha512.text = s }\n        }.start()\n    }\n\n    private fun addItemView(holder: InfoHolder, container: ViewGroup?): TextView {\n        @SuppressLint(\"InflateParams\") val view =\n            layoutInflater.inflate(R.layout.file_explorer_tab_info_dialog_item, null, false)\n        val v = (view.findViewById<View>(R.id.item) as TextInputLayout).apply {\n            editText!!.apply {\n                keyListener = null\n                setTextIsSelectable(true)\n                setText(holder.info)\n            }\n            hint = holder.name\n        }\n        container!!.addView(view)\n        return v.editText!!\n    }\n\n    fun addItem(name: String, info: String?, clickable: Boolean): FileInfoDialog {\n        infoList.add(InfoHolder(name, info, clickable))\n        return this\n    }\n\n    override fun getTheme(): Int {\n        return R.style.ThemeOverlay_Material3_BottomSheetDialog\n    }\n\n    class InfoHolder(var name: String, var info: String?, var clickable: Boolean)\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/dialog/SearchDialog.kt",
    "content": "package com.raival.fileexplorer.tab.file.dialog\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.view.WindowManager\nimport android.widget.*\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.bottomsheet.BottomSheetDialogFragment\nimport com.google.android.material.textfield.TextInputLayout\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.extension.getFileDetails\nimport com.raival.fileexplorer.tab.file.FileExplorerTabDataHolder\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.misc.IconHelper\nimport com.raival.fileexplorer.tab.file.model.FileItem\nimport com.raival.fileexplorer.util.Log\nimport com.raival.fileexplorer.util.PrefsUtils\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport org.apache.commons.io.FileUtils\nimport org.apache.commons.io.LineIterator\nimport java.io.File\nimport java.util.regex.Pattern\n\nclass SearchDialog : BottomSheetDialogFragment {\n    private val tab: FileExplorerTabFragment\n    private val filesToSearchIn: ArrayList<File>\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var input: TextInputLayout\n    private lateinit var deepSearch: CheckBox\n    private lateinit var optimizedSearching: CheckBox\n    private lateinit var regEx: CheckBox\n    private lateinit var suffix: CheckBox\n    private lateinit var prefix: CheckBox\n    private lateinit var searchButton: Button\n    private lateinit var progress: ProgressBar\n    private lateinit var fileCount: TextView\n    private lateinit var query: String\n    private var active = false\n\n    constructor(tab: FileExplorerTabFragment, directory: File) {\n        filesToSearchIn = ArrayList()\n        filesToSearchIn.add(directory)\n        this.tab = tab\n    }\n\n    constructor(tab: FileExplorerTabFragment, files: ArrayList<File>) {\n        this.tab = tab\n        filesToSearchIn = files\n    }\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        dialog?.window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)\n        return inflater.inflate(R.layout.search_fragment, container, false)\n    }\n\n    override fun getTheme(): Int {\n        return R.style.ThemeOverlay_Material3_BottomSheetDialog\n    }\n\n    @SuppressLint(\"SetTextI18n\", \"NotifyDataSetChanged\")\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        recyclerView = view.findViewById(R.id.rv)\n        input = view.findViewById(R.id.input)\n        deepSearch = view.findViewById(R.id.search_option_deep_search)\n        optimizedSearching = view.findViewById(R.id.search_option_optimized_searching)\n        regEx = view.findViewById(R.id.search_option_regex)\n        suffix = view.findViewById(R.id.search_option_suffix)\n        prefix = view.findViewById(R.id.search_option_prefix)\n        searchButton = view.findViewById(R.id.search_button)\n        progress = view.findViewById(R.id.progress)\n        fileCount = view.findViewById(R.id.file_count)\n\n        recyclerView.layoutManager = LinearLayoutManager(requireContext())\n        recyclerView.adapter = RecyclerViewAdapter()\n        progress.visibility = View.GONE\n        searchButton.setOnClickListener {\n            if (active) {\n                searchButton.text = \"Search\"\n                progress.visibility = View.GONE\n                recyclerView.adapter?.notifyDataSetChanged()\n                active = false\n                isCancelable = true\n            } else {\n                isCancelable = false\n                searchButton.text = \"Stop\"\n                (tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList.clear()\n                recyclerView.adapter?.notifyDataSetChanged()\n                progress.visibility = View.VISIBLE\n                loseFocus(input)\n                active = true\n                query = input.editText?.text.toString()\n                CoroutineScope(Dispatchers.IO).launch {\n                    for (file in filesToSearchIn) {\n                        if (!active) break\n                        searchIn(\n                            file,\n                            deepSearch.isChecked,\n                            optimizedSearching.isChecked,\n                            regEx.isChecked,\n                            prefix.isChecked,\n                            suffix.isChecked\n                        )\n                    }\n                    withContext(Dispatchers.Main) {\n                        searchButton.text = \"Search\"\n                        progress.visibility = View.GONE\n                        recyclerView.adapter!!.notifyDataSetChanged()\n                        active = false\n                        isCancelable = true\n                        updateFileCount()\n                    }\n                }\n            }\n        }\n        if ((tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList.size > 0) {\n            fileCount.visibility = View.VISIBLE\n            updateFileCount()\n        }\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun updateFileCount() {\n        fileCount.text =\n            (tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList.size.toString() + \" results found\"\n    }\n\n    private fun searchIn(\n        file: File,\n        isDeepSearch: Boolean,\n        optimized: Boolean,\n        useRegex: Boolean,\n        startWith: Boolean,\n        endWith: Boolean\n    ) {\n        if (file.isFile) {\n            if (isDeepSearch) {\n                if (PrefsUtils.Settings.deepSearchFileSizeLimit >= file.length()) {\n                    if (optimized) {\n                        var lineIterator: LineIterator? = null\n                        try {\n                            lineIterator = FileUtils.lineIterator(file)\n                            while (lineIterator.hasNext()) {\n                                if (useRegex) {\n                                    if (Pattern.compile(query).matcher(lineIterator.nextLine())\n                                            .find()\n                                    ) {\n                                        addFileItem(file)\n                                        break\n                                    }\n                                } else {\n                                    if (lineIterator.nextLine().contains(query)) {\n                                        addFileItem(file)\n                                        break\n                                    }\n                                }\n                            }\n                        } catch (e: Exception) {\n                            Log.e(TAG, e)\n                        } finally {\n                            LineIterator.closeQuietly(lineIterator)\n                        }\n                    } else {\n                        try {\n                            if (useRegex) {\n                                if (Pattern.compile(query).matcher(file.readText()).find()) {\n                                    addFileItem(file)\n                                }\n                            } else {\n                                if (file.readText().contains(query)) {\n                                    addFileItem(file)\n                                }\n                            }\n                        } catch (e: Exception) {\n                            Log.e(TAG, e)\n                        }\n                    }\n                }\n            } else {\n                if (startWith) {\n                    if (file.name.startsWith(query)) addFileItem(file)\n                } else if (endWith) {\n                    if (file.name.endsWith(query)) addFileItem(file)\n                } else {\n                    if (file.name.contains(query)) addFileItem(file)\n                }\n            }\n        } else {\n            val children = file.listFiles()\n            if (children != null) {\n                for (child in children) {\n                    if (!active) break\n                    searchIn(child, isDeepSearch, optimized, useRegex, startWith, endWith)\n                }\n            }\n        }\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    private fun addFileItem(file: File) {\n        (tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList.add(FileItem(file))\n        recyclerView.post {\n            updateFileCount()\n            recyclerView.adapter?.notifyDataSetChanged()\n        }\n    }\n\n    private fun loseFocus(view: View) {\n        view.isEnabled = false\n        view.isEnabled = true\n    }\n\n    private inner class RecyclerViewAdapter :\n        RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder>() {\n        override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n            val inflater =\n                requireActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater\n            @SuppressLint(\"InflateParams\") val view =\n                inflater.inflate(R.layout.file_explorer_tab_file_item, null)\n            val lp = RecyclerView.LayoutParams(\n                ViewGroup.LayoutParams.MATCH_PARENT,\n                ViewGroup.LayoutParams.WRAP_CONTENT\n            )\n            view.layoutParams = lp\n            return ViewHolder(view)\n        }\n\n        override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n            holder.bind()\n        }\n\n        override fun getItemCount(): Int {\n            return (tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList.size\n        }\n\n        inner class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {\n            var name: TextView\n            var details: TextView\n            var icon: ImageView\n            var background: View\n            fun bind() {\n                val position = adapterPosition\n                val fileItem = (tab.dataHolder as FileExplorerTabDataHolder?)!!.searchList[position]\n                name.text = fileItem.file.name\n                details.text = fileItem.file.getFileDetails()\n                IconHelper.setFileIcon(icon, fileItem.file)\n                icon.alpha = if (fileItem.file.isHidden) 0.5f else 1f\n                background.setOnClickListener {\n                    tab.setCurrentDirectory(fileItem.file.parentFile!!)\n                    tab.refresh()\n                    tab.focusOn(fileItem.file)\n                    dismiss()\n                }\n            }\n\n            init {\n                name = v.findViewById(R.id.file_name)\n                details = v.findViewById(R.id.file_details)\n                icon = v.findViewById(R.id.file_icon)\n                background = v.findViewById(R.id.background)\n            }\n        }\n    }\n\n    companion object {\n        private const val TAG = \"Search Dialog\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/dialog/TasksDialog.kt",
    "content": "package com.raival.fileexplorer.tab.file.dialog\n\nimport android.annotation.SuppressLint\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.TextView\nimport androidx.appcompat.app.AlertDialog\nimport androidx.lifecycle.ViewModelProvider\nimport com.google.android.material.bottomsheet.BottomSheetDialogFragment\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.model.MainViewModel\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.model.Task\nimport com.raival.fileexplorer.tab.file.model.Task.OnFinishListener\nimport com.raival.fileexplorer.tab.file.model.Task.OnUpdateListener\n\nclass TasksDialog(private val fileExplorerTabFragment: FileExplorerTabFragment) :\n    BottomSheetDialogFragment() {\n\n    private lateinit var container: ViewGroup\n    private lateinit var mainViewModel: MainViewModel\n    private lateinit var alertDialog: AlertDialog\n    private lateinit var placeHolder: View\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        return inflater.inflate(R.layout.file_explorer_tab_task_dialog, container, false)\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        container = view.findViewById(R.id.container)\n        placeHolder = view.findViewById(R.id.place_holder)\n        mainViewModel = ViewModelProvider(requireActivity()).get(MainViewModel::class.java)\n        val tasks = mainViewModel.tasks\n        if (tasks.isNotEmpty()) {\n            placeHolder.visibility = View.GONE\n        }\n        for (task in tasks) {\n            addTask(task, task.isValid)\n        }\n    }\n\n    override fun getTheme(): Int {\n        return R.style.ThemeOverlay_Material3_BottomSheetDialog\n    }\n\n    private fun addTask(task: Task, valid: Boolean) {\n        val v =\n            layoutInflater.inflate(R.layout.file_explorer_tab_task_dialog_item, container, false)\n        (v.findViewById<View>(R.id.label) as TextView).text = task.name\n        (v.findViewById<View>(R.id.task_details) as TextView).text = task.details\n        v.findViewById<View>(R.id.background).setOnClickListener {\n            if (!valid) {\n                showMsg(\"This task is invalid, some files are missing, long click to execute it anyway\")\n                return@setOnClickListener\n            }\n            run(task)\n        }\n        v.findViewById<View>(R.id.remove).setOnClickListener {\n            mainViewModel.tasks.remove(task)\n            container.removeView(v)\n            if (container.childCount == 0) {\n                placeHolder.visibility = View.VISIBLE\n            }\n        }\n        v.setOnLongClickListener label@{\n            if (!valid) {\n                run(task)\n                return@label true\n            }\n            false\n        }\n        container.addView(v)\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun run(task: Task) {\n        dismiss()\n        task.setActiveDirectory(fileExplorerTabFragment.currentDirectory!!)\n        val view = progressView\n        val progressText = view.findViewById<TextView>(R.id.msg)\n        progressText.text = \"Processing...\"\n        alertDialog = MaterialAlertDialogBuilder(requireActivity())\n            .setCancelable(false)\n            .setView(view)\n            .show()\n\n        task.start(\n            object : OnUpdateListener {\n                override fun onUpdate(progress: String) {\n                    progressText.text = progress\n                }\n            },\n            object : OnFinishListener {\n                override fun onFinish(result: String) {\n                    mainViewModel.tasks.remove(task)\n                    showMsg(result)\n                    fileExplorerTabFragment.refresh()\n                    alertDialog.dismiss()\n                }\n            }\n        )\n    }\n\n    @get:SuppressLint(\"InflateParams\")\n    private val progressView: View\n        get() = requireActivity().layoutInflater.inflate(R.layout.progress_view, null)\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/APKSignerUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.tab.file.misc.BuildUtils.unzipFromAssets\nimport java.io.File\n\nobject APKSignerUtils {\n    val pk8: File\n        get() {\n            val check = File(App.appContext.filesDir.toString() + \"/build/testkey.pk8\")\n            if (check.exists()) {\n                return check\n            }\n            unzipFromAssets(\n                App.appContext,\n                \"build/testkey.pk8.zip\",\n                check.parentFile?.absolutePath\n            )\n            return check\n        }\n    val pem: File\n        get() {\n            val check = File(App.appContext.filesDir.toString() + \"/build/testkey.x509.pem\")\n            if (check.exists()) {\n                return check\n            }\n            unzipFromAssets(\n                App.appContext,\n                \"build/testkey.x509.pem.zip\",\n                check.parentFile?.absolutePath\n            )\n            return check\n        }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/BuildUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport android.content.Context\nimport android.util.Log\nimport com.raival.fileexplorer.App\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.IOException\nimport java.io.InputStream\nimport java.util.zip.ZipEntry\nimport java.util.zip.ZipInputStream\n\nobject BuildUtils {\n    private const val BUFFER_SIZE = 1024 * 10\n    private const val TAG = \"Decompress\"\n    val lambdaStubsJarFile: File\n        get() {\n            val check = File(App.appContext.filesDir.toString() + \"/build/core-lambda-stubs.jar\")\n            if (check.exists()) {\n                return check\n            }\n            unzipFromAssets(\n                App.appContext,\n                \"build/lambda-stubs.zip\",\n                check.parentFile?.absolutePath\n            )\n            return check\n        }\n    val rtJarFile: File\n        get() {\n            val customRt = File(App.appContext.getExternalFilesDir(null), \"build/rt.jar\")\n            if (customRt.exists() && customRt.isFile) {\n                return customRt\n            }\n            val check = File(App.appContext.filesDir.toString() + \"/build/rt.jar\")\n            if (check.exists()) {\n                return check\n            }\n            unzipFromAssets(\n                App.appContext,\n                \"build/rt.zip\",\n                check.parentFile?.absolutePath\n            )\n            return check\n        }\n\n    @JvmStatic\n    fun unzipFromAssets(context: Context, zipFile: String, destination: String?) {\n        var des = destination\n        try {\n            if (des == null || des.isEmpty()) des =\n                context.filesDir.absolutePath\n            val stream = context.assets.open(zipFile)\n            unzip(stream, des)\n        } catch (e: IOException) {\n            e.printStackTrace()\n        }\n    }\n\n    private fun dirChecker(destination: String?, dir: String) {\n        val f = File(destination, dir)\n        if (!f.isDirectory) {\n            val success = f.mkdirs()\n            if (!success) {\n                Log.w(TAG, \"Failed to create folder \" + f.name)\n            }\n        }\n    }\n\n    private fun unzip(stream: InputStream, destination: String?) {\n        dirChecker(destination, \"\")\n        val buffer = ByteArray(BUFFER_SIZE)\n        try {\n            val zin = ZipInputStream(stream)\n            var ze: ZipEntry\n            while (zin.nextEntry.also { ze = it } != null) {\n                Log.v(TAG, \"Unzipping \" + ze.name)\n                if (ze.isDirectory) {\n                    dirChecker(destination, ze.name)\n                } else {\n                    val f = File(destination, ze.name)\n                    if (!f.exists()) {\n                        val success = f.createNewFile()\n                        if (!success) {\n                            Log.w(\n                                TAG,\n                                com.raival.fileexplorer.util.Log.UNABLE_TO + \" \" + FileUtils.CREATE_FILE + \" \" + f.name\n                            )\n                            continue\n                        }\n                        val fileOutputStream = FileOutputStream(f)\n                        var count: Int\n                        while (zin.read(buffer).also { count = it } != -1) {\n                            fileOutputStream.write(buffer, 0, count)\n                        }\n                        zin.closeEntry()\n                        fileOutputStream.close()\n                    }\n                }\n            }\n            zin.close()\n        } catch (e: Exception) {\n            Log.e(TAG, \"unzip\", e)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/FileMimeTypes.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nobject FileMimeTypes {\n    const val apkType = \"apk\"\n    const val rarType = \"rar\"\n    const val pdfType = \"pdf\"\n    const val javaType = \"java\"\n    const val kotlinType = \"kt\"\n    const val xmlType = \"xml\"\n\n    const val aiType = \"ai\"\n    const val docType = \"doc\"\n    const val docxType = \"docx\"\n    const val xlsType = \"xls\"\n    const val xlsxType = \"xlsx\"\n\n    const val pptType = \"ppt\"\n    const val pptxType = \"pptx\"\n    const val sqlType = \"sql\"\n    const val svgType = \"svg\"\n\n    const val default = \"*/*\"\n\n    @JvmField\n    val fontType = arrayOf(\"ttf\", \"otf\")\n\n    @JvmField\n    val audioType = arrayOf(\"mp3\", \"4mp\", \"aup\", \"ogg\", \"3ga\", \"m4b\", \"wav\", \"acc\", \"m4a\")\n\n    @JvmField\n    val videoType = arrayOf(\"mp4\", \"mov\", \"avi\", \"mkv\", \"wmv\", \"m4v\", \"3gp\", \"webm\")\n\n    @JvmField\n    val archiveType = arrayOf(\"zip\", \"7z\", \"tar\", \"jar\", \"gz\", \"xz\", \"xapk\", \"obb\", apkType)\n\n    @JvmField\n    val textType = arrayOf(\"txt\", \"text\", \"log\", \"dsc\", \"apt\", \"rtf\", \"rtx\")\n\n    @JvmField\n    val codeType = arrayOf(javaType, xmlType, \"py\", \"css\", kotlinType, \"cs\", \"xml\", \"json\")\n\n    @JvmField\n    val imageType = arrayOf(\"png\", \"jpeg\", \"jpg\", \"heic\", \"tiff\", \"gif\", \"webp\", svgType, \"bmp\")\n\n    val mimeTypes = HashMap<String, String>().apply {\n        put(\"asm\", \"text/x-asm\");\n        put(\"def\", \"text/plain\");\n        put(\"in\", \"text/plain\");\n        put(\"rc\", \"text/plain\");\n        put(\"list\", \"text/plain\");\n        put(\"log\", \"text/plain\");\n        put(\"pl\", \"text/plain\");\n        put(\"prop\", \"text/plain\");\n        put(\"properties\", \"text/plain\");\n        put(\"rc\", \"text/plain\");\n\n        put(\"epub\", \"application/epub+zip\");\n        put(\"ibooks\", \"application/x-ibooks+zip\");\n\n        put(\"ifb\", \"text/calendar\");\n        put(\"eml\", \"message/rfc822\");\n        put(\"msg\", \"application/vnd.ms-outlook\");\n\n        put(\"ace\", \"application/x-ace-compressed\");\n        put(\"bz\", \"application/x-bzip\");\n        put(\"bz2\", \"application/x-bzip2\");\n        put(\"cab\", \"application/vnd.ms-cab-compressed\");\n        put(\"gz\", \"application/x-gzip\");\n        put(\"lrf\", \"application/octet-stream\");\n        put(\"jar\", \"application/java-archive\");\n        put(\"xz\", \"application/x-xz\");\n        put(\"Z\", \"application/x-compress\");\n\n        put(\"bat\", \"application/x-msdownload\");\n        put(\"ksh\", \"text/plain\");\n        put(\"sh\", \"application/x-sh\");\n\n        put(\"db\", \"application/octet-stream\");\n        put(\"db3\", \"application/octet-stream\");\n\n        put(\"otf\", \"application/x-font-otf\");\n        put(\"ttf\", \"application/x-font-ttf\");\n        put(\"psf\", \"application/x-font-linux-psf\");\n\n        put(\"cgm\", \"image/cgm\");\n        put(\"btif\", \"image/prs.btif\");\n        put(\"dwg\", \"image/vnd.dwg\");\n        put(\"dxf\", \"image/vnd.dxf\");\n        put(\"fbs\", \"image/vnd.fastbidsheet\");\n        put(\"fpx\", \"image/vnd.fpx\");\n        put(\"fst\", \"image/vnd.fst\");\n        put(\"mdi\", \"image/vnd.ms-mdi\");\n        put(\"npx\", \"image/vnd.net-fpx\");\n        put(\"xif\", \"image/vnd.xiff\");\n        put(\"pct\", \"image/x-pict\");\n        put(\"pic\", \"image/x-pict\");\n\n        put(\"adp\", \"audio/adpcm\");\n        put(\"au\", \"audio/basic\");\n        put(\"snd\", \"audio/basic\");\n        put(\"m2a\", \"audio/mpeg\");\n        put(\"m3a\", \"audio/mpeg\");\n        put(\"oga\", \"audio/ogg\");\n        put(\"spx\", \"audio/ogg\");\n        put(\"aac\", \"audio/x-aac\");\n        put(\"mka\", \"audio/x-matroska\");\n\n        put(\"jpgv\", \"video/jpeg\");\n        put(\"jpgm\", \"video/jpm\");\n        put(\"jpm\", \"video/jpm\");\n        put(\"mj2\", \"video/mj2\");\n        put(\"mjp2\", \"video/mj2\");\n        put(\"mpa\", \"video/mpeg\");\n        put(\"ogv\", \"video/ogg\");\n        put(\"flv\", \"video/x-flv\");\n        put(\"mkv\", \"video/x-matroska\");\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/FileOpener.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport android.content.Intent\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.raival.fileexplorer.activity.MainActivity\nimport com.raival.fileexplorer.activity.TextEditorActivity\nimport com.raival.fileexplorer.extension.openFileWith\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass FileOpener(private val mainActivity: MainActivity) {\n    fun openFile(file: File) {\n        if (!handleKnownFileExtensions(file)) {\n            file.openFileWith(false)\n        }\n    }\n\n    private fun handleKnownFileExtensions(file: File): Boolean {\n        if (FileMimeTypes.textType.contains(file.extension.lowercase())\n            || FileMimeTypes.codeType.contains(file.extension.lowercase())\n        ) {\n            val intent = Intent()\n            intent.setClass(mainActivity, TextEditorActivity::class.java)\n            intent.putExtra(\"file\", file.absolutePath)\n            mainActivity.startActivity(intent)\n            return true\n        }\n        if (file.extension == FileMimeTypes.apkType) {\n            val dialog = MaterialAlertDialogBuilder(mainActivity)\n                .setMessage(\"Do you want to install this app?\")\n                .setPositiveButton(\"Install\") { _, _ -> file.openFileWith(false) }\n            CoroutineScope(Dispatchers.Main).launch {\n                dialog.setTitle(FileUtils.getApkName(file))\n                dialog.setIcon(FileUtils.getApkIcon(file))\n                dialog.show()\n            }\n            return true\n        }\n        return false\n    }\n\n\n    companion object {\n        private val TAG = FileOpener::class.java.simpleName\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/FileUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.content.pm.PackageInfo\nimport android.graphics.drawable.Drawable\nimport android.net.Uri\nimport android.text.Editable\nimport android.text.TextWatcher\nimport android.webkit.MimeTypeMap\nimport androidx.core.content.ContextCompat\nimport androidx.core.content.FileProvider\nimport com.google.android.material.textfield.TextInputLayout\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.util.Log\nimport com.raival.fileexplorer.util.PrefsUtils\nimport com.raival.fileexplorer.util.PrefsUtils.FileExplorerTab.listFoldersFirst\nimport com.raival.fileexplorer.util.PrefsUtils.FileExplorerTab.sortingMethod\nimport java.io.*\nimport java.util.*\n\n\nobject FileUtils {\n    const val INTERNAL_STORAGE = \"Internal Storage\"\n    const val CREATE_FILE = \"create file\"\n\n    private fun sortFoldersFirst(): Comparator<File> {\n        return Comparator { file1: File, file2: File ->\n            if (file1.isDirectory && !file2.isDirectory) {\n                return@Comparator -1\n            } else if (!file1.isDirectory && file2.isDirectory) {\n                return@Comparator 1\n            } else {\n                return@Comparator 0\n            }\n        }\n    }\n\n    private fun sortFilesFirst(): Comparator<File> {\n        return Comparator { file2: File, file1: File ->\n            if (file1.isDirectory && !file2.isDirectory) {\n                return@Comparator -1\n            } else if (!file1.isDirectory && file2.isDirectory) {\n                return@Comparator 1\n            } else {\n                return@Comparator 0\n            }\n        }\n    }\n\n    val comparators: ArrayList<Comparator<File>>\n        get() {\n            val list = ArrayList<Comparator<File>>()\n            when (sortingMethod) {\n                PrefsUtils.SORT_NAME_A2Z -> {\n                    list.add(sortNameAsc())\n                }\n                PrefsUtils.SORT_NAME_Z2A -> {\n                    list.add(sortNameDesc())\n                }\n                PrefsUtils.SORT_SIZE_SMALLER -> {\n                    list.add(sortSizeAsc())\n                }\n                PrefsUtils.SORT_SIZE_BIGGER -> {\n                    list.add(sortSizeDesc())\n                }\n                PrefsUtils.SORT_DATE_NEWER -> {\n                    list.add(sortDateDesc())\n                }\n                PrefsUtils.SORT_DATE_OLDER -> {\n                    list.add(sortDateAsc())\n                }\n            }\n            if (listFoldersFirst()) {\n                list.add(sortFoldersFirst())\n            } else {\n                list.add(sortFilesFirst())\n            }\n            return list\n        }\n\n    private fun sortDateAsc(): Comparator<File> {\n        return Comparator.comparingLong { obj: File -> obj.lastModified() }\n    }\n\n    private fun sortDateDesc(): Comparator<File> {\n        return Comparator { file1: File, file2: File ->\n            file2.lastModified().compareTo(file1.lastModified())\n        }\n    }\n\n    private fun sortNameAsc(): Comparator<File> {\n        return Comparator.comparing { file: File -> file.name.lowercase(Locale.getDefault()) }\n    }\n\n    private fun sortNameDesc(): Comparator<File> {\n        return Comparator { file1: File, file2: File ->\n            file2.name.lowercase(Locale.getDefault()).compareTo(\n                file1.name.lowercase(\n                    Locale.getDefault()\n                )\n            )\n        }\n    }\n\n    private fun sortSizeAsc(): Comparator<File> {\n        return Comparator.comparingLong { obj: File -> obj.length() }\n    }\n\n    private fun sortSizeDesc(): Comparator<File> {\n        return Comparator { file1: File, file2: File ->\n            file2.length().compareTo(file1.length())\n        }\n    }\n\n    fun isSingleFolder(selectedFiles: ArrayList<File>): Boolean {\n        return selectedFiles.size == 1 && !selectedFiles[0].isFile\n    }\n\n    fun isSingleFile(selectedFiles: ArrayList<File>): Boolean {\n        return selectedFiles.size == 1 && selectedFiles[0].isFile\n    }\n\n    fun isOnlyFiles(selectedFiles: ArrayList<File>): Boolean {\n        for (file in selectedFiles) {\n            if (!file.isFile) return false\n        }\n        return true\n    }\n\n    fun isArchiveFiles(selectedFiles: ArrayList<File>): Boolean {\n        for (file in selectedFiles) {\n            if (!FileMimeTypes.archiveType.contains(file.extension.lowercase())) return false\n        }\n        return true\n    }\n\n    fun copy(fileToCopy: File, destinationFolder: File, overwrite: Boolean) {\n        if (!fileToCopy.exists()) throw Exception(\"File \" + fileToCopy.absolutePath + \" doesn't exist\")\n        if (fileToCopy.isFile) {\n            copyFile(fileToCopy, destinationFolder, overwrite)\n        } else copyFolder(fileToCopy, destinationFolder, overwrite)\n    }\n\n    fun copyFile(fileToCopy: File, destinationFolder: File, overwrite: Boolean) {\n        copyFile(fileToCopy, fileToCopy.name, destinationFolder, overwrite)\n    }\n\n    /**\n     * Copy file to a new folder\n     *\n     * @param fileToCopy:        the file that needs to be copied\n     * @param fileName:          The name of the copied file in the destination folder\n     * @param destinationFolder: The folder to copy the file into\n     * @param overwrite:         Whether or not to overwrite the already existed file in the destination folder\n     * @throws Exception: Any errors that occur during the copying process\n     */\n    fun copyFile(\n        fileToCopy: File,\n        fileName: String,\n        destinationFolder: File,\n        overwrite: Boolean\n    ) {\n        if (!destinationFolder.exists() && !destinationFolder.mkdirs()) {\n            throw Exception(Log.UNABLE_TO + \" create folder: \" + destinationFolder)\n        }\n        val newFile = File(destinationFolder, fileName)\n        if (newFile.exists() && !overwrite) return\n        if (!newFile.exists() && !newFile.createNewFile()) {\n            throw Exception(Log.UNABLE_TO + \" \" + CREATE_FILE + \": \" + newFile)\n        }\n        val fileInputStream = FileInputStream(fileToCopy)\n        val fileOutputStream = FileOutputStream(newFile, false)\n        val buff = ByteArray(1024)\n        var length: Int\n        while (fileInputStream.read(buff).also { length = it } > 0) {\n            fileOutputStream.write(buff, 0, length)\n        }\n        fileInputStream.close()\n        fileOutputStream.close()\n    }\n\n    fun copyFolder(folderToCopy: File, destinationFolder: File, overwrite: Boolean) {\n        copyFolder(folderToCopy, folderToCopy.name, destinationFolder, overwrite)\n    }\n\n    /**\n     * Copy folder to another new folder\n     *\n     * @param folderToCopy:      the folder that needs to be copied\n     * @param folderName:        The name of the copied folder in the destination folder\n     * @param destinationFolder: The folder to copy into\n     * @param overwrite:         Whether or not to overwrite the already existed files in the destination folder\n     * @throws Exception: Any errors that occur during the copying process\n     */\n    fun copyFolder(\n        folderToCopy: File,\n        folderName: String,\n        destinationFolder: File,\n        overwrite: Boolean\n    ) {\n        val newFolder = File(destinationFolder, folderName)\n        if (!newFolder.exists() && !newFolder.mkdirs()) {\n            throw Exception(Log.UNABLE_TO + \" create folder: \" + newFolder)\n        }\n        if (newFolder.isFile) {\n            throw Exception(\n                \"\"\"${Log.UNABLE_TO} create folder: $newFolder.\nA file with the same name exists.\"\"\"\n            )\n        }\n        val folderContent = folderToCopy.listFiles()\n        if (folderContent != null) {\n            for (file in folderContent) {\n                if (file.isFile) {\n                    copyFile(file, file.name, newFolder, overwrite)\n                } else {\n                    copyFolder(file, file.name, newFolder, overwrite)\n                }\n            }\n        }\n    }\n\n    fun deleteFile(file: File) {\n        if (!file.exists()) {\n            throw Exception(\"File $file doesn't exist\")\n        }\n        if (!file.isFile) {\n            val fileArr = file.listFiles()\n            if (fileArr != null) {\n                for (subFile in fileArr) {\n                    if (subFile.isDirectory) {\n                        deleteFile(subFile)\n                    }\n                    if (subFile.isFile) {\n                        if (!subFile.delete()) throw Exception(Log.UNABLE_TO + \" delete file: \" + subFile)\n                    }\n                }\n            }\n        }\n        if (!file.delete()) throw Exception(Log.UNABLE_TO + \" delete file: \" + file)\n    }\n\n    fun deleteFiles(selectedFiles: ArrayList<File>) {\n        for (file in selectedFiles) {\n            deleteFile(file)\n        }\n    }\n\n    fun move(file: File, destination: File?) {\n        if (file.isFile) {\n            if (!file.renameTo(File(destination, file.name))) {\n                throw IOException(\"Failed to move file: \" + file.absolutePath)\n            }\n        } else {\n            val parent = File(destination, file.name)\n            if (parent.mkdir()) {\n                val files = file.listFiles()\n                if (files != null) {\n                    for (child in files) {\n                        move(child, parent)\n                    }\n                }\n                if (!file.delete()) {\n                    throw IOException(\"Failed to delete file: \" + file.absolutePath)\n                }\n            } else {\n                throw IOException(\"Failed to create folder: $parent\")\n            }\n        }\n    }\n\n    fun setFileValidator(input: TextInputLayout, directory: File) {\n        setFileValidator(input, null, directory)\n    }\n\n    fun setFileValidator(input: TextInputLayout, file: File?, directory: File) {\n        setFileValidator(input, file, directory.list()?.toMutableList() as ArrayList<String>)\n    }\n\n    fun setFileValidator(input: TextInputLayout, file: File?, nameList: ArrayList<String>) {\n        if (file != null) input.error = \"This name is the same as before\"\n        else input.error = \"Invalid file name\"\n\n        input.editText?.addTextChangedListener(object : TextWatcher {\n            override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}\n            override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}\n            override fun afterTextChanged(editable: Editable) {\n                if (isValidFileName(editable.toString())) {\n                    if (!nameList.contains(editable.toString())) {\n                        input.error = null\n                    } else if (file != null && editable.toString() == file.name) {\n                        input.error = \"This name is the same as before\"\n                    } else {\n                        input.error = \"This name is in use\"\n                    }\n                } else {\n                    input.error = \"Invalid file name\"\n                }\n            }\n        })\n    }\n\n    fun isValidFileName(name: String): Boolean {\n        return if (name.isEmpty()) false else !hasInvalidChar(\n            name\n        )\n    }\n\n    private fun hasInvalidChar(name: String): Boolean {\n        for (ch in name.toCharArray()) {\n            when (ch) {\n                '\"', '*', '/', ':', '>', '<', '?', '\\\\', '|', '\\n', '\\t', 0x7f.toChar() -> {\n                    return true\n                }\n                else -> {}\n            }\n            if (ch.code <= 0x1f) return true\n        }\n        return false\n    }\n\n    fun rename(file: File, newName: String): Boolean {\n        return file.renameTo(File(file.parentFile, newName))\n    }\n\n    fun shareFiles(filesToShare: ArrayList<File>, activity: Activity) {\n        if (filesToShare.size == 1) {\n            val file = filesToShare[0]\n            if (file.isDirectory) {\n                showMsg(\"Folders cannot be shared\")\n                return\n            }\n            val uri = FileProvider.getUriForFile(\n                App.appContext,\n                App.appContext.packageName + \".provider\",\n                file\n            )\n            val intent = Intent(Intent.ACTION_SEND)\n            intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)\n            intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)\n            intent.type =\n                MimeTypeMap.getSingleton().getMimeTypeFromExtension(file.extension)\n            intent.putExtra(Intent.EXTRA_STREAM, uri)\n            activity.startActivity(Intent.createChooser(intent, \"Share file\"))\n            return\n        }\n        val intent = Intent(Intent.ACTION_SEND_MULTIPLE)\n        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)\n        intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)\n        intent.type = \"*/*\"\n        val uriList = ArrayList<Uri>()\n        for (file in filesToShare) {\n            if (file.isFile) {\n                val uri = FileProvider.getUriForFile(\n                    App.appContext,\n                    App.appContext.packageName + \".provider\",\n                    file\n                )\n                uriList.add(uri)\n            }\n        }\n        intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uriList)\n        activity.startActivity(Intent.createChooser(intent, \"Share files\"))\n    }\n\n    fun getFormattedSize(length: Long, format: String): String {\n        if (length > 1073741824) return String.format(\n            Locale.ENGLISH,\n            format,\n            length.toFloat() / 1073741824\n        ) + \"GB\"\n        if (length > 1048576) return String.format(\n            Locale.ENGLISH,\n            format,\n            length.toFloat() / 1048576\n        ) + \"MB\"\n        return if (length > 1024) String.format(\n            Locale.ENGLISH,\n            format,\n            length.toFloat() / 1024\n        ) + \"KB\" else length.toString() + \"B\"\n    }\n\n    fun getFormattedSize(length: Long): String {\n        return getFormattedSize(length, \"%.02f\")\n    }\n\n    fun copyFromInputStream(inputStream: InputStream): String {\n        val outputStream = ByteArrayOutputStream()\n        val buf = ByteArray(1024)\n        var i: Int\n        try {\n            while (inputStream.read(buf).also { i = it } != -1) {\n                outputStream.write(buf, 0, i)\n            }\n            outputStream.close()\n            inputStream.close()\n        } catch (ignored: IOException) {\n        }\n        return outputStream.toString()\n    }\n\n    fun getApkIcon(file: File): Drawable? {\n        val pi: PackageInfo? =\n            App.appContext.packageManager.getPackageArchiveInfo(file.absolutePath, 0)\n        return if (pi != null) {\n            pi.applicationInfo.sourceDir = file.absolutePath\n            pi.applicationInfo.publicSourceDir = file.absolutePath\n            pi.applicationInfo.loadIcon(App.appContext.packageManager)\n        } else {\n            ContextCompat.getDrawable(App.appContext, R.drawable.unknown_file_extension)\n        }\n    }\n\n    fun getApkName(file: File): String? {\n        val pi = App.appContext.packageManager.getPackageArchiveInfo(file.absolutePath, 0)\n        return if (pi != null) {\n            App.appContext.packageManager.getApplicationLabel(pi.applicationInfo).toString()\n        } else {\n            pi?.applicationInfo?.name\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/IconHelper.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport android.widget.ImageView\nimport com.bumptech.glide.Glide\nimport com.bumptech.glide.load.engine.DiskCacheStrategy\nimport com.bumptech.glide.request.RequestOptions\nimport com.bumptech.glide.signature.ObjectKey\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.glide.model.IconRes\nimport java.io.File\nimport java.util.zip.ZipEntry\n\nobject IconHelper {\n    fun setFileIcon(icon: ImageView, file: Any) {\n        if ((file is File && !file.isFile) || (file is ZipEntry && file.isDirectory)) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.ic_baseline_folder_24, icon.context))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        val ext: String = if (file is File) file.extension.lowercase()\n        else \"\"\n\n        if (ext == FileMimeTypes.pdfType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.pdf_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (FileMimeTypes.textType.contains(ext)) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.txt_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (ext == FileMimeTypes.javaType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.java_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (ext == FileMimeTypes.kotlinType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.kt_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (ext == FileMimeTypes.xmlType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.xml_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (FileMimeTypes.codeType.contains(ext)) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.code_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (ext == FileMimeTypes.apkType) {\n            Glide.with(icon.context)\n                .load(if (file is File) file.absolutePath else R.drawable.apk_placeholder)\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .error(R.drawable.apk_placeholder)\n                .into(icon)\n            return\n        }\n        if (FileMimeTypes.archiveType.contains(ext) || ext == FileMimeTypes.rarType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.archive_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n        if (FileMimeTypes.videoType.contains(ext)) {\n            if (file is File) {\n                Glide.with(icon.context)\n                    .load(file)\n                    .signature(ObjectKey(file.lastModified()))\n                    .error(R.drawable.video_file_extension)\n                    .placeholder(R.drawable.video_file_extension)\n                    .into(icon)\n            } else {\n                Glide.with(icon.context)\n                    .load(R.drawable.video_file_extension)\n                    .diskCacheStrategy(DiskCacheStrategy.NONE)\n                    .skipMemoryCache(true)\n                    .into(icon)\n            }\n            return\n        }\n        if (FileMimeTypes.audioType.contains(ext)) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.music_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (FileMimeTypes.fontType.contains(ext)) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.font_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (ext == FileMimeTypes.sqlType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.sql_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (ext == FileMimeTypes.aiType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.vector_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (ext == FileMimeTypes.svgType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.svg_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (FileMimeTypes.imageType.contains(ext)) {\n            if (file is File) {\n                Glide.with(icon.context)\n                    .applyDefaultRequestOptions(RequestOptions().override(100).encodeQuality(80))\n                    .load(file)\n                    .signature(ObjectKey(file.lastModified()))\n                    .error(R.drawable.image_file_extension)\n                    .into(icon)\n            } else {\n                Glide.with(icon.context)\n                    .load(R.drawable.image_file_extension)\n                    .diskCacheStrategy(DiskCacheStrategy.NONE)\n                    .skipMemoryCache(true)\n                    .into(icon)\n            }\n            return\n        }\n\n        if (ext == FileMimeTypes.docType || ext == FileMimeTypes.docxType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.doc_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (ext == FileMimeTypes.xlsType || ext == FileMimeTypes.xlsxType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.xls_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        if (ext == FileMimeTypes.pptType || ext == FileMimeTypes.pptxType) {\n            Glide.with(icon.context)\n                .load(IconRes(R.drawable.powerpoint_file_extension))\n                .diskCacheStrategy(DiskCacheStrategy.NONE)\n                .skipMemoryCache(true)\n                .into(icon)\n            return\n        }\n\n        Glide.with(icon.context)\n            .load(IconRes(R.drawable.unknown_file_extension))\n            .diskCacheStrategy(DiskCacheStrategy.NONE)\n            .skipMemoryCache(true)\n            .into(icon)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/ZipUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc\n\nimport net.lingala.zip4j.ZipFile\nimport java.io.File\n\nfun archive(filesToCompress: ArrayList<File>, zipFile: File?) {\n    val zip = ZipFile(zipFile)\n    for (file in filesToCompress) {\n        if (file.isFile) {\n            zip.addFile(file)\n        } else {\n            zip.addFolder(file)\n        }\n    }\n}\n\nfun extract(filesToExtract: ArrayList<File>, directory: File) {\n    for (file in filesToExtract) {\n        if (file.isFile) {\n            val output = File(directory, file.name.substring(0, file.name.lastIndexOf(\".\")))\n            if (output.mkdir()) {\n                ZipFile(file).extractAll(output.absolutePath)\n            } else {\n                ZipFile(file).extractAll(directory.absolutePath)\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/md5/HashUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc.md5\n\nimport java.io.File\nimport java.io.FileInputStream\nimport java.io.InputStream\nimport java.security.MessageDigest\n\nobject HashUtils {\n\n    private const val STREAM_BUFFER_LENGTH = 1024\n\n    fun getCheckSumFromFile(digest: MessageDigest, filePath: String): String {\n        val file = File(filePath)\n        return getCheckSumFromFile(digest, file)\n    }\n\n    fun getCheckSumFromFile(digest: MessageDigest, file: File): String {\n        val fis = FileInputStream(file)\n        val byteArray = updateDigest(digest, fis).digest()\n        fis.close()\n        val hexCode = StringUtils.encodeHex(byteArray, true)\n        return String(hexCode)\n    }\n\n    private fun updateDigest(digest: MessageDigest, data: InputStream): MessageDigest {\n        val buffer = ByteArray(STREAM_BUFFER_LENGTH)\n        var read = data.read(buffer, 0, STREAM_BUFFER_LENGTH)\n        while (read > -1) {\n            digest.update(buffer, 0, read)\n            read = data.read(buffer, 0, STREAM_BUFFER_LENGTH)\n        }\n        return digest\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/md5/MessageDigestAlgorithm.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc.md5\n\nobject MessageDigestAlgorithm {\n    const val MD2 = \"MD2\"\n    const val MD5 = \"MD5\"\n    const val SHA_1 = \"SHA-1\"\n    const val SHA_224 = \"SHA-224\"\n    const val SHA_256 = \"SHA-256\"\n    const val SHA_384 = \"SHA-384\"\n    const val SHA_512 = \"SHA-512\"\n    const val SHA_512_224 = \"SHA-512/224\"\n    const val SHA_512_256 = \"SHA-512/256\"\n    const val SHA3_224 = \"SHA3-224\"\n    const val SHA3_256 = \"SHA3-256\"\n    const val SHA3_384 = \"SHA3-384\"\n    const val SHA3_512 = \"SHA3-512\"\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/misc/md5/StringUtils.kt",
    "content": "package com.raival.fileexplorer.tab.file.misc.md5\n\nobject StringUtils {\n\n    private val DIGITS_LOWER =\n        charArrayOf('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f')\n\n    private val DIGITS_UPPER =\n        charArrayOf('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F')\n\n    fun encodeHex(data: ByteArray, toLowerCase: Boolean): CharArray {\n        return encodeHex(data, if (toLowerCase) DIGITS_LOWER else DIGITS_UPPER)\n    }\n\n    fun encodeHex(data: ByteArray, toDigits: CharArray): CharArray {\n        val l = data.size\n        val out = CharArray(l shl 1)\n        // two characters form the hex value.\n        var i = 0\n        var j = 0\n        while (i < l) {\n            out[j++] = toDigits[0xF0 and data[i].toInt() ushr 4]\n            out[j++] = toDigits[0x0F and data[i].toInt()]\n            i++\n        }\n        return out\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/model/FileItem.kt",
    "content": "package com.raival.fileexplorer.tab.file.model\n\nimport java.io.File\n\nclass FileItem(var f: File) {\n    @JvmField\n    var isSelected = false\n\n    @JvmField\n    var file: File = f\n    var details = \"\"\n    var name = \"\"\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/model/Task.kt",
    "content": "package com.raival.fileexplorer.tab.file.model\n\nimport java.io.File\n\nabstract class Task {\n    abstract val name: String?\n    abstract val details: String?\n    abstract val isValid: Boolean\n\n    abstract fun setActiveDirectory(directory: File)\n    abstract fun start(onUpdate: OnUpdateListener, onFinish: OnFinishListener)\n\n    interface OnUpdateListener {\n        fun onUpdate(progress: String)\n    }\n\n    interface OnFinishListener {\n        fun onFinish(result: String)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/observer/FileListObserver.kt",
    "content": "package com.raival.fileexplorer.tab.file.observer\n\nimport androidx.recyclerview.widget.RecyclerView.AdapterDataObserver\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.adapter.FileListAdapter\n\nclass FileListObserver(\n    private val parentFragment: FileExplorerTabFragment,\n    private val fileListAdapter: FileListAdapter?\n) : AdapterDataObserver() {\n\n    override fun onChanged() {\n        super.onChanged()\n        checkIfEmpty()\n    }\n\n    private fun checkIfEmpty() {\n        parentFragment.showPlaceholder(fileListAdapter != null && fileListAdapter.itemCount == 0)\n    }\n\n    init {\n        checkIfEmpty()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/options/FileOptionsHandler.kt",
    "content": "package com.raival.fileexplorer.tab.file.options\n\nimport android.annotation.SuppressLint\nimport android.content.Intent\nimport android.view.View\nimport android.widget.TextView\nimport androidx.appcompat.app.AlertDialog\nimport androidx.lifecycle.ViewModelProvider\nimport com.google.android.material.dialog.MaterialAlertDialogBuilder\nimport com.raival.fileexplorer.App.Companion.showMsg\nimport com.raival.fileexplorer.R\nimport com.raival.fileexplorer.activity.MainActivity\nimport com.raival.fileexplorer.activity.TextEditorActivity\nimport com.raival.fileexplorer.activity.model.MainViewModel\nimport com.raival.fileexplorer.common.BackgroundTask\nimport com.raival.fileexplorer.common.dialog.CustomDialog\nimport com.raival.fileexplorer.common.dialog.OptionsDialog\nimport com.raival.fileexplorer.extension.openFileWith\nimport com.raival.fileexplorer.tab.BaseTabFragment\nimport com.raival.fileexplorer.tab.file.FileExplorerTabFragment\nimport com.raival.fileexplorer.tab.file.dialog.FileInfoDialog\nimport com.raival.fileexplorer.tab.file.dialog.SearchDialog\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.tab.file.model.FileItem\nimport com.raival.fileexplorer.tab.file.model.Task.OnFinishListener\nimport com.raival.fileexplorer.tab.file.model.Task.OnUpdateListener\nimport com.raival.fileexplorer.tab.file.task.CompressTask\nimport com.raival.fileexplorer.tab.file.task.CopyTask\nimport com.raival.fileexplorer.tab.file.task.CutTask\nimport com.raival.fileexplorer.tab.file.task.ExtractTask\nimport com.raival.fileexplorer.util.PrefsUtils\nimport java.io.File\n\nclass FileOptionsHandler(private val parentFragment: FileExplorerTabFragment) {\n    private var mainViewModel: MainViewModel? = null\n        get() {\n            if (field == null) {\n                field = ViewModelProvider(parentFragment.requireActivity()).get(\n                    MainViewModel::class.java\n                )\n            }\n            return field\n        }\n\n    fun showOptions(fileItem: FileItem) {\n        val selectedFiles = ArrayList<File>()\n        for (item in parentFragment.selectedFiles) {\n            selectedFiles.add(item.file)\n        }\n        if (!fileItem.isSelected) selectedFiles.add(fileItem.file)\n        val title: String = if (selectedFiles.size == 1) {\n            fileItem.file.name\n        } else {\n            \"\" + selectedFiles.size + \" Files selected\"\n        }\n        val bottomDialog = OptionsDialog(title)\n        bottomDialog.show(parentFragment.parentFragmentManager, \"FileOptionsDialog\")\n\n        //______________| Options |_______________\\\\\n        if (selectedFiles.size == 1) {\n            val list = PrefsUtils.TextEditor.fileExplorerTabBookmarks\n            if (!list.contains(selectedFiles[0].toString())) {\n                bottomDialog.addOption(\n                    \"Add to bookmarks\",\n                    R.drawable.ic_baseline_bookmark_add_24,\n                    {\n                        list.add(selectedFiles[0].absolutePath)\n                        PrefsUtils.General.setFileExplorerTabBookmarks(list)\n                        (parentFragment.requireActivity() as MainActivity).refreshBookmarks()\n                        showMsg(\"Added to bookmarks successfully\")\n                    },\n                    true\n                )\n            } else {\n                bottomDialog.addOption(\n                    \"Remove from bookmarks\",\n                    R.drawable.ic_baseline_bookmark_remove_24,\n                    {\n                        list.remove(selectedFiles[0].absolutePath)\n                        PrefsUtils.General.setFileExplorerTabBookmarks(list)\n                        (parentFragment.requireActivity() as MainActivity).refreshBookmarks()\n                        showMsg(\"Removed from bookmarks successfully\")\n                    },\n                    true\n                )\n            }\n        }\n        if (FileUtils.isSingleFolder(selectedFiles)) {\n            bottomDialog.addOption(\n                \"Open in a new tab\",\n                R.drawable.ic_round_tab_24,\n                {\n                    if (parentFragment.requireActivity() is MainActivity) {\n                        val fragment = FileExplorerTabFragment(selectedFiles[0])\n                        (parentFragment.requireActivity() as MainActivity).addNewTab(\n                            fragment,\n                            BaseTabFragment.FILE_EXPLORER_TAB_FRAGMENT_PREFIX\n                                    + (parentFragment.requireActivity() as MainActivity).generateRandomTag()\n                        )\n                    }\n                },\n                true\n            )\n        }\n        if (FileUtils.isOnlyFiles(selectedFiles)) {\n            bottomDialog.addOption(\"Share\", R.drawable.ic_round_share_24, {\n                FileUtils.shareFiles(selectedFiles, parentFragment.requireActivity())\n                parentFragment.setSelectAll(false)\n            }, true)\n        }\n        if (FileUtils.isSingleFile(selectedFiles)) {\n            bottomDialog.addOption(\n                \"Open with\",\n                R.drawable.ic_baseline_open_in_new_24,\n                {\n                    selectedFiles[0].openFileWith(true)\n                    parentFragment.setSelectAll(false)\n                },\n                true\n            )\n        }\n        bottomDialog.addOption(\"Copy\", R.drawable.ic_baseline_file_copy_24, {\n            mainViewModel!!.tasks.add(CopyTask(selectedFiles))\n            parentFragment.setSelectAll(false)\n            notifyNewTask()\n        }, true)\n        if (FileUtils.isSingleFile(selectedFiles)) {\n            bottomDialog.addOption(\n                \"Create a backup\",\n                R.drawable.ic_baseline_file_copy_24,\n                {\n                    createBackupFile(selectedFiles[0])\n                    parentFragment.setSelectAll(false)\n                },\n                true\n            )\n        }\n        bottomDialog.addOption(\"Cut\", R.drawable.ic_round_content_cut_24, {\n            mainViewModel!!.tasks.add(CutTask(selectedFiles))\n            parentFragment.setSelectAll(false)\n            notifyNewTask()\n        }, true)\n        if (selectedFiles.size == 1) {\n            bottomDialog.addOption(\n                \"Rename\",\n                R.drawable.ic_round_edit_24,\n                { showRenameDialog(selectedFiles) },\n                true\n            )\n        }\n        bottomDialog.addOption(\n            \"Delete\",\n            R.drawable.ic_round_delete_forever_24,\n            { confirmDeletion(selectedFiles) },\n            true\n        )\n        if (FileUtils.isSingleFile(selectedFiles)) {\n            bottomDialog.addOption(\n                \"Edit with code editor\",\n                R.drawable.ic_round_edit_note_24,\n                {\n                    openWithTextEditor(\n                        selectedFiles[0]\n                    )\n                },\n                true\n            )\n        }\n        if (FileUtils.isArchiveFiles(selectedFiles)) {\n            bottomDialog.addOption(\"Extract\", R.drawable.ic_baseline_logout_24, {\n                mainViewModel!!.tasks.add(ExtractTask(selectedFiles))\n                parentFragment.setSelectAll(false)\n                notifyNewTask()\n            }, true)\n        }\n        bottomDialog.addOption(\n            \"Compress\",\n            R.drawable.ic_round_compress_24,\n            { compressFiles(CompressTask(selectedFiles)) },\n            true\n        )\n        if (selectedFiles.size == 1) {\n            bottomDialog.addOption(\"Details\", R.drawable.ic_baseline_info_24, {\n                showFileInfoDialog(\n                    selectedFiles[0]\n                )\n            }, true)\n        }\n        bottomDialog.addOption(\"Search\", R.drawable.ic_round_manage_search_24, {\n            val searchFragment = SearchDialog(\n                parentFragment, selectedFiles\n            )\n            searchFragment.show(parentFragment.parentFragmentManager, \"\")\n            parentFragment.setSelectAll(false)\n        }, true)\n    }\n\n    private fun createBackupFile(file: File) {\n        val backgroundTask = BackgroundTask()\n        backgroundTask.setTasks({\n            backgroundTask.showProgressDialog(\n                \"creating a backup file...\",\n                parentFragment.requireActivity()\n            )\n        }, {\n            try {\n                FileUtils.copyFile(\n                    file, generateUniqueFileName(\n                        file.nameWithoutExtension\n                                + \"_copy.\"\n                                + file.extension, file.parentFile!!\n                    ), file.parentFile!!, true\n                )\n            } catch (e: Exception) {\n                e.printStackTrace()\n                showMsg(e.toString())\n            }\n        }) {\n            backgroundTask.dismiss()\n            showMsg(\"New backup file has been created\")\n            parentFragment.refresh()\n        }\n        backgroundTask.run()\n    }\n\n    private fun generateUniqueFileName(name: String, directory: File): String {\n        var file = File(directory, name)\n        var i = 2\n        while (file.exists()) {\n            file = File(directory, name)\n            val newName =\n                file.nameWithoutExtension + i + \".\" + file.extension\n            file = File(directory, newName)\n            i++\n        }\n        return file.name\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    private fun compressFiles(task: CompressTask) {\n        val customDialog = CustomDialog()\n        val input = customDialog.createInput(parentFragment.requireActivity(), \"Archive name\")\n\n        input.editText?.setText(\".zip\")\n        FileUtils.setFileValidator(input, (parentFragment).currentDirectory!!)\n        CustomDialog()\n            .setTitle(\"Compress\")\n            .addView(input)\n            .setPositiveButton(\"Save\", {\n                if (input.error == null) {\n                    if (task.isValid) {\n                        task.setActiveDirectory(\n                            File(\n                                parentFragment.currentDirectory, input.editText!!\n                                    .text.toString()\n                            )\n                        )\n                        val view = progressView\n                        val progressText = view.findViewById<TextView>(R.id.msg)\n                        progressText.text = \"Processing...\"\n                        val dialog = dialog.setView(view).show()\n                        task.start(\n                            object : OnUpdateListener {\n                                override fun onUpdate(progress: String) {\n                                    progressText.text = progress\n                                }\n                            },\n                            object : OnFinishListener {\n                                override fun onFinish(result: String) {\n                                    showMsg(result)\n                                    parentFragment.refresh()\n                                    dialog.dismiss()\n                                }\n                            })\n                    } else {\n                        showMsg(\"The files to compress are missing\")\n                    }\n                } else {\n                    showMsg(\"Compress canceled\")\n                }\n            }, true)\n            .show(parentFragment.childFragmentManager, \"\")\n    }\n\n    private fun openWithTextEditor(file: File) {\n        val intent = Intent()\n        intent.setClass(parentFragment.requireActivity(), TextEditorActivity::class.java)\n        intent.putExtra(\"file\", file.absolutePath)\n        parentFragment.requireActivity().startActivity(intent)\n    }\n\n    private fun notifyNewTask() {\n        showMsg(\"A new task has been added\")\n    }\n\n    private fun showFileInfoDialog(file: File) {\n        FileInfoDialog(file).setUseDefaultFileInfo(true)\n            .show(parentFragment.parentFragmentManager, \"\")\n    }\n\n    @get:SuppressLint(\"InflateParams\")\n    private val progressView: View\n        get() = parentFragment.requireActivity().layoutInflater.inflate(\n            R.layout.progress_view,\n            null\n        )\n    private val dialog: AlertDialog.Builder\n        get() = MaterialAlertDialogBuilder(parentFragment.requireActivity())\n            .setCancelable(false)\n\n    private fun showRenameDialog(selectedFiles: ArrayList<File>) {\n        val customDialog = CustomDialog()\n        val input = customDialog.createInput(parentFragment.requireActivity(), \"File name\")\n\n        input.editText?.setText(selectedFiles[0].name)\n        input.editText!!.setSingleLine()\n        FileUtils.setFileValidator(input, selectedFiles[0], selectedFiles[0].parentFile)\n\n        customDialog.setTitle(\"Rename\")\n            .addView(input)\n            .setPositiveButton(\"Save\", {\n                if (input.error == null) {\n                    if (!FileUtils.rename(\n                            selectedFiles[0], input.editText!!\n                                .text.toString()\n                        )\n                    ) {\n                        showMsg(\"Cannot rename this file\")\n                    } else {\n                        showMsg(\"File has been renamed\")\n                        parentFragment.refresh()\n                    }\n                } else {\n                    showMsg(\"Rename canceled\")\n                }\n            }, true)\n            .show(parentFragment.parentFragmentManager, \"\")\n    }\n\n    private fun confirmDeletion(selectedFiles: ArrayList<File>) {\n        MaterialAlertDialogBuilder(parentFragment.requireContext())\n            .setTitle(\"Delete\")\n            .setMessage(\"Do you want to delete selected files? this action cannot be redone.\")\n            .setPositiveButton(\"Confirm\") { _, _ -> doDelete(selectedFiles) }\n            .setNegativeButton(\"Cancel\", null)\n            .show()\n    }\n\n    private fun doDelete(selectedFiles: ArrayList<File>) {\n        parentFragment.setSelectAll(false)\n        var errorMsg = \"\"\n        val backgroundTask = BackgroundTask()\n        backgroundTask.setTasks({\n            backgroundTask.showProgressDialog(\n                \"Deleting files...\",\n                parentFragment.requireActivity()\n            )\n        }, {\n            try {\n                FileUtils.deleteFiles(selectedFiles)\n            } catch (e: Exception) {\n                e.printStackTrace()\n                errorMsg = \"Something went wrong, check logs for more details\"\n            }\n        }) {\n            backgroundTask.dismiss()\n            showMsg(if(errorMsg.isEmpty()) \"Files have been deleted\" else errorMsg)\n            parentFragment.refresh()\n        }\n        backgroundTask.run()\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/task/CompressTask.kt",
    "content": "package com.raival.fileexplorer.tab.file.task\n\nimport com.raival.fileexplorer.tab.file.misc.archive\nimport com.raival.fileexplorer.tab.file.model.Task\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\n\nclass CompressTask(private val filesToCompress: ArrayList<File>) : Task() {\n    private var zipFile: File? = null\n    override val name: String\n        get() = \"Compress\"\n    override val details: String\n        get() {\n            val sb = StringBuilder()\n            var first = true\n            for (file in filesToCompress) {\n                if (!first) {\n                    sb.append(\", \")\n                }\n                sb.append(file.name)\n                first = false\n            }\n            return sb.toString()\n        }\n    override val isValid: Boolean\n        get() {\n            for (file in filesToCompress) {\n                if (!file.exists()) return false\n            }\n            return true\n        }\n\n    override fun setActiveDirectory(directory: File) {\n        zipFile = directory\n    }\n\n    override fun start(onUpdate: OnUpdateListener, onFinish: OnFinishListener) {\n        CoroutineScope(Dispatchers.IO).launch {\n            withContext(Dispatchers.Main) {\n                onUpdate.onUpdate(\"Compressing....\")\n            }\n            try {\n                archive(filesToCompress, zipFile)\n                withContext(Dispatchers.Main) {\n                    onFinish.onFinish(\"Files have been compressed successfully\")\n                }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                withContext(Dispatchers.Main) {\n                    onFinish.onFinish(e.toString())\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/task/CopyTask.kt",
    "content": "package com.raival.fileexplorer.tab.file.task\n\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.tab.file.model.Task\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\n\nclass CopyTask(private val filesToCopy: ArrayList<File>) : Task() {\n    private var activeDirectory: File? = null\n    override val name: String\n        get() = \"Copy\"\n    override val details: String\n        get() {\n            val sb = StringBuilder()\n            var first = true\n            for (file in filesToCopy) {\n                if (!first) {\n                    sb.append(\", \")\n                }\n                sb.append(file.name)\n                first = false\n            }\n            return sb.toString()\n        }\n    override val isValid: Boolean\n        get() {\n            for (file in filesToCopy) {\n                if (!file.exists()) return false\n            }\n            return true\n        }\n\n    override fun setActiveDirectory(directory: File) {\n        activeDirectory = directory\n    }\n\n    override fun start(onUpdate: OnUpdateListener, onFinish: OnFinishListener) {\n        CoroutineScope(Dispatchers.IO).launch {\n            var error = false\n            try {\n                var progress = 1\n                for (file in filesToCopy) {\n                    try {\n                        val finalProgress = progress\n                        withContext(Dispatchers.Main) {\n                            onUpdate.onUpdate(\n                                \"[\"\n                                        + finalProgress\n                                        + \"/\"\n                                        + filesToCopy.size\n                                        + \"]\"\n                                        + \"Copying \"\n                                        + file.name\n                            )\n                        }\n                        FileUtils.copy(file, activeDirectory!!, true)\n                    } catch (exception: Exception) {\n                        error = true\n                    }\n                    ++progress\n                }\n                val finalError = error\n                withContext(Dispatchers.Main) { onFinish.onFinish(if (finalError) \"An error occurred, some files didn't get copied\" else \"Files copied successfully\") }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                withContext(Dispatchers.Main) { onFinish.onFinish(e.toString()) }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/task/CutTask.kt",
    "content": "package com.raival.fileexplorer.tab.file.task\n\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport com.raival.fileexplorer.tab.file.model.Task\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\n\nclass CutTask(private val filesToCut: ArrayList<File>) : Task() {\n    private var activeDirectory: File? = null\n    override val name: String\n        get() = \"Cut\"\n    override val details: String\n        get() {\n            val sb = StringBuilder()\n            var first = true\n            for (file in filesToCut) {\n                if (!first) {\n                    sb.append(\", \")\n                }\n                sb.append(file.name)\n                first = false\n            }\n            return sb.toString()\n        }\n    override val isValid: Boolean\n        get() {\n            for (file in filesToCut) {\n                if (!file.exists()) return false\n            }\n            return true\n        }\n\n    override fun setActiveDirectory(directory: File) {\n        activeDirectory = directory\n    }\n\n    override fun start(onUpdate: OnUpdateListener, onFinish: OnFinishListener) {\n        CoroutineScope(Dispatchers.IO).launch {\n            var error = false\n            try {\n                var progress = 1\n                for (file in filesToCut) {\n                    try {\n                        val finalProgress = progress\n                        withContext(Dispatchers.Main) {\n                            onUpdate.onUpdate(\n                                \"[\"\n                                        + finalProgress\n                                        + \"/\"\n                                        + filesToCut.size\n                                        + \"]\"\n                                        + \"Moving \"\n                                        + file.name\n                            )\n                        }\n                        FileUtils.move(file, activeDirectory)\n                    } catch (exception: Exception) {\n                        error = true\n                    }\n                    ++progress\n                }\n                val finalError = error\n                withContext(Dispatchers.Main) { onFinish.onFinish(if (finalError) \"An error occurred, some files haven't been moved\" else \"Files have been moved successfully\") }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                withContext(Dispatchers.Main) { onFinish.onFinish(e.toString()) }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/tab/file/task/ExtractTask.kt",
    "content": "package com.raival.fileexplorer.tab.file.task\n\nimport android.os.Handler\nimport android.os.Looper\nimport com.raival.fileexplorer.tab.file.misc.extract\nimport com.raival.fileexplorer.tab.file.model.Task\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\n\nclass ExtractTask(private val filesToExtract: ArrayList<File>) : Task() {\n    private var activeDirectory: File? = null\n    override val name: String\n        get() = \"Extract\"\n    override val details: String\n        get() {\n            val sb = StringBuilder()\n            var first = true\n            for (file in filesToExtract) {\n                if (!first) {\n                    sb.append(\", \")\n                }\n                sb.append(file.name)\n                first = false\n            }\n            return sb.toString()\n        }\n    override val isValid: Boolean\n        get() {\n            for (file in filesToExtract) {\n                if (!file.exists()) return false\n            }\n            return true\n        }\n\n    override fun setActiveDirectory(directory: File) {\n        activeDirectory = directory\n    }\n\n    override fun start(onUpdate: OnUpdateListener, onFinish: OnFinishListener) {\n        CoroutineScope(Dispatchers.IO).launch {\n            Handler(Looper.getMainLooper()).post { onUpdate.onUpdate(\"Extracting....\") }\n            try {\n                extract(filesToExtract, activeDirectory!!)\n                withContext(Dispatchers.Main) { onFinish.onFinish(\"Files have been extracted successfully\") }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                withContext(Dispatchers.Main) { onFinish.onFinish(e.toString()) }\n            }\n        }.start()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/util/Log.kt",
    "content": "package com.raival.fileexplorer.util\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.util.Log\nimport com.raival.fileexplorer.activity.SettingsActivity\nimport com.raival.fileexplorer.extension.surroundWithBrackets\nimport com.raival.fileexplorer.tab.file.misc.FileUtils\nimport java.io.*\nimport java.text.SimpleDateFormat\n\nobject Log {\n    private const val TAG = \"CustomLog\"\n\n    // This is just a common phrase used in many classes\n    const val UNABLE_TO = \"Unable to\"\n    const val SOMETHING_WENT_WRONG = \"Something went wrong while\"\n    private var logFile: File? = null\n    fun start(context: Context) {\n        logFile = File(context.getExternalFilesDir(null)!!.absolutePath + \"/debug/log.txt\")\n    }\n\n    fun e(tag: String?, e: Exception?) {\n        e(tag, \"\", e)\n    }\n\n    @JvmOverloads\n    fun e(tag: String?, msg: String, throwable: Throwable? = null) {\n        write(tag, \"Error\", msg, throwable)\n    }\n\n    fun w(tag: String?, e: Exception?) {\n        w(tag, \"\", e)\n    }\n\n    @JvmOverloads\n    fun w(tag: String?, msg: String, throwable: Throwable? = null) {\n        write(tag, \"Warning\", msg, throwable)\n    }\n\n    fun d(tag: String?, e: Exception?) {\n        d(tag, \"\", e)\n    }\n\n    @JvmOverloads\n    fun d(tag: String?, msg: String, throwable: Throwable? = null) {\n        write(tag, \"Warning\", msg, throwable)\n    }\n\n    fun i(tag: String?, e: Exception?) {\n        i(tag, \"\", e)\n    }\n\n    @JvmOverloads\n    fun i(tag: String?, msg: String, throwable: Throwable? = null) {\n        write(tag, \"Info\", msg, throwable)\n    }\n\n    @get:SuppressLint(\"SimpleDateFormat\")\n    private val currentTime: String\n        get() = SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss.SSS\").format(System.currentTimeMillis())\n\n    fun getStackTrace(throwable: Throwable): String {\n        val result: Writer = StringWriter()\n        val printWriter = PrintWriter(result)\n        throwable.printStackTrace(printWriter)\n        val stacktraceAsString = result.toString()\n        printWriter.close()\n        return stacktraceAsString\n    }\n\n    private fun write(tag: String?, priority: String, msg: String, throwable: Throwable?) {\n        if (!checkPrefs(priority)) return\n        if (logFile == null) return\n        if (!logFile!!.parentFile?.exists()!! && !logFile!!.parentFile?.mkdirs()!!) {\n            Log.e(TAG, UNABLE_TO + \" \" + FileUtils.CREATE_FILE + \": \" + logFile!!.parentFile)\n            return\n        }\n        try {\n            if (!logFile!!.exists() && !logFile!!.createNewFile()) {\n                Log.e(TAG, UNABLE_TO + \" \" + FileUtils.CREATE_FILE + \": \" + logFile)\n                return\n            }\n            val logToWrite = StringBuilder()\n            if (logFile!!.length() > 0) logToWrite.append(System.lineSeparator())\n            logToWrite.append(currentTime.surroundWithBrackets())\n                .append(priority.surroundWithBrackets())\n                .append(tag!!.surroundWithBrackets())\n                .append(\":\").append(\" \")\n            if (msg.isNotEmpty()) {\n                logToWrite.append(msg)\n            }\n            if (throwable != null) {\n                logToWrite.append(System.lineSeparator()).append(getStackTrace(throwable))\n            }\n            val fileWriter = FileWriter(logFile, true)\n            fileWriter.write(logToWrite.toString())\n            fileWriter.flush()\n            fileWriter.close()\n        } catch (e: Exception) {\n            Log.e(TAG, UNABLE_TO + \" write to log file\" + System.lineSeparator() + e)\n            Log.e(tag, msg, throwable)\n        }\n    }\n\n    private fun checkPrefs(tag: String): Boolean {\n        return if (PrefsUtils.Settings.logMode == SettingsActivity.LOG_MODE_ALL) true\n        else PrefsUtils.Settings.logMode == SettingsActivity.LOG_MODE_ERRORS_ONLY && tag == \"Error\"\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/util/PrefsUtils.kt",
    "content": "package com.raival.fileexplorer.util\n\nimport com.google.gson.Gson\nimport com.pixplicity.easyprefs.library.Prefs\nimport com.raival.fileexplorer.activity.SettingsActivity\nimport com.raival.fileexplorer.extension.getStringList\n\nobject PrefsUtils {\n    const val SORT_NAME_A2Z = 1\n    const val SORT_NAME_Z2A = 2\n    const val SORT_SIZE_SMALLER = 3\n    const val SORT_SIZE_BIGGER = 4\n    const val SORT_DATE_OLDER = 5\n    const val SORT_DATE_NEWER = 6\n\n    object TextEditor {\n        var textEditorWordwrap: Boolean\n            get() = Prefs.getBoolean(\"text_editor_wordwrap\", false)\n            set(wordwrap) {\n                Prefs.putBoolean(\"text_editor_wordwrap\", wordwrap)\n            }\n        var textEditorShowLineNumber: Boolean\n            get() = Prefs.getBoolean(\"text_editor_show_line_number\", true)\n            set(showLineNumber) {\n                Prefs.putBoolean(\"text_editor_show_line_number\", showLineNumber)\n            }\n        var textEditorPinLineNumber: Boolean\n            get() = Prefs.getBoolean(\"text_editor_pin_line_number\", true)\n            set(pinLineNumber) {\n                Prefs.putBoolean(\"text_editor_pin_line_number\", pinLineNumber)\n            }\n        var textEditorMagnifier: Boolean\n            get() = Prefs.getBoolean(\"text_editor_magnifier\", true)\n            set(magnifier) {\n                Prefs.putBoolean(\"text_editor_magnifier\", magnifier)\n            }\n        var textEditorReadOnly: Boolean\n            get() = Prefs.getBoolean(\"text_editor_read_only\", false)\n            set(readOnly) {\n                Prefs.putBoolean(\"text_editor_read_only\", readOnly)\n            }\n        var textEditorAutocomplete: Boolean\n            get() = Prefs.getBoolean(\"text_editor_autocomplete\", false)\n            set(autocomplete) {\n                Prefs.putBoolean(\"text_editor_autocomplete\", autocomplete)\n            }\n        val fileExplorerTabBookmarks: ArrayList<String>\n            get() = Prefs.getString(\"file_explorer_tab_bookmarks\", \"[]\").getStringList()\n    }\n\n    object FileExplorerTab {\n        @JvmStatic\n        var sortingMethod: Int\n            get() = Prefs.getInt(\"sorting_method\", SORT_NAME_A2Z)\n            set(method) {\n                Prefs.putInt(\"sorting_method\", method)\n            }\n\n        fun setListFoldersFirst(b: Boolean) {\n            Prefs.putBoolean(\"list_folders_first\", b)\n        }\n\n        @JvmStatic\n        fun listFoldersFirst(): Boolean {\n            return Prefs.getBoolean(\"list_folders_first\", true)\n        }\n    }\n\n    object Settings {\n        var deepSearchFileSizeLimit: Long\n            get() = Prefs.getLong(\n                \"settings_deep_search_file_size_limit\",\n                (6 * 1024 * 1024).toLong()\n            )\n            set(limit) {\n                Prefs.putLong(\"settings_deep_search_file_size_limit\", limit)\n            }\n\n        @JvmStatic\n        var themeMode: String\n            get() = Prefs.getString(\"settings_theme_mode\", SettingsActivity.THEME_MODE_AUTO)\n            set(themeMode) {\n                Prefs.putString(\"settings_theme_mode\", themeMode)\n            }\n        var logMode: String\n            get() = Prefs.getString(\"settings_log_mode\", SettingsActivity.LOG_MODE_ERRORS_ONLY)\n            set(logMode) {\n                Prefs.putString(\"settings_log_mode\", logMode)\n            }\n        var showBottomToolbarLabels: Boolean\n            get() = Prefs.getBoolean(\"settings_show_bottom_toolbar_labels\", true)\n            set(showBottomToolbarLabels) {\n                Prefs.putBoolean(\"settings_show_bottom_toolbar_labels\", showBottomToolbarLabels)\n            }\n    }\n\n    object General {\n        fun setFileExplorerTabBookmarks(list: ArrayList<String>) {\n            Prefs.putString(\"file_explorer_tab_bookmarks\", Gson().toJson(list))\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/raival/fileexplorer/util/Utils.kt",
    "content": "package com.raival.fileexplorer.util\n\nimport android.content.Context\nimport android.content.res.Configuration\nimport android.util.TypedValue\nimport androidx.annotation.ColorInt\nimport com.raival.fileexplorer.App\nimport com.raival.fileexplorer.activity.SettingsActivity\nimport com.raival.fileexplorer.util.PrefsUtils.Settings.themeMode\nimport java.util.*\n\nobject Utils {\n    private const val ALLOWED_CHARACTERS = \"0123456789qwertyuiopasdfghjklzxcvbnm_\"\n\n    @ColorInt\n    fun getColorAttribute(id: Int, context: Context): Int {\n        val out = TypedValue()\n        context.theme.resolveAttribute(id, out, true)\n        return out.data\n    }\n\n    val isDarkMode: Boolean\n        get() = when (themeMode) {\n            SettingsActivity.THEME_MODE_DARK -> {\n                true\n            }\n            SettingsActivity.THEME_MODE_LIGHT -> {\n                false\n            }\n            else -> {\n                (App.appContext.resources.configuration.uiMode\n                        and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES\n            }\n        }\n\n    fun getRandomString(sizeOfRandomString: Int): String {\n        val random = Random()\n        val sb = StringBuilder(sizeOfRandomString)\n        for (i in 0 until sizeOfRandomString) {\n            sb.append(ALLOWED_CHARACTERS[random.nextInt(ALLOWED_CHARACTERS.length)])\n        }\n        return sb.toString()\n    }\n}"
  },
  {
    "path": "app/src/main/res/drawable/app_icon_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <group\n        android:scaleX=\"1.8792\"\n        android:scaleY=\"1.8792\"\n        android:translateX=\"31.4496\"\n        android:translateY=\"31.4496\">\n        <path\n            android:fillColor=\"@android:color/white\"\n            android:pathData=\"M19.97,6.43L12,2L4.03,6.43L9.1,9.24C9.83,8.48 10.86,8 12,8s2.17,0.48 2.9,1.24L19.97,6.43zM10,12c0,-1.1 0.9,-2 2,-2s2,0.9 2,2s-0.9,2 -2,2S10,13.1 10,12zM11,21.44L3,17V8.14l5.13,2.85C8.04,11.31 8,11.65 8,12c0,1.86 1.27,3.43 3,3.87V21.44zM13,21.44v-5.57c1.73,-0.44 3,-2.01 3,-3.87c0,-0.35 -0.04,-0.69 -0.13,-1.01L21,8.14L21,17L13,21.44z\" />\n    </group>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/fastscroll_thumb.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <solid android:color=\"?attr/colorSecondaryContainer\" />\n    <corners android:radius=\"0dp\" />\n    <corners android:radius=\"8dp\" />\n    <padding\n        android:bottom=\"10dp\"\n        android:left=\"10dp\"\n        android:right=\"10dp\"\n        android:top=\"10dp\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_add_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_arrow_back_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_assignment_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_bookmark_add_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M21,7h-2v2h-2V7h-2V5h2V3h2v2h2V7zM19,21l-7,-3l-7,3V5c0,-1.1 0.9,-2 2,-2l7,0c-0.63,0.84 -1,1.87 -1,3c0,2.76 2.24,5 5,5c0.34,0 0.68,-0.03 1,-0.1V21z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_bookmark_remove_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M21,7h-6V5h6V7zM19,10.9c-0.32,0.07 -0.66,0.1 -1,0.1c-2.76,0 -5,-2.24 -5,-5c0,-1.13 0.37,-2.16 1,-3L7,3C5.9,3 5,3.9 5,5v16l7,-3l7,3V10.9z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_bug_report_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_chevron_right_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_delete_sweep_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M15,16h4v2h-4zM15,8h7v2h-7zM15,12h6v2h-6zM3,18c0,1.1 0.9,2 2,2h6c1.1,0 2,-0.9 2,-2L13,8L3,8v10zM14,5h-3l-1,-1L6,4L5,5L2,5v2h12z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_file_copy_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5l6,6v10c0,1.1 -0.9,2 -2,2L7.99,23C6.89,23 6,22.1 6,21l0.01,-14c0,-1.1 0.89,-2 1.99,-2h7zM14,12h5.5L14,6.5L14,12z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_folder_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_folder_open_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_info_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_layers_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M11.99,18.54l-7.37,-5.73L3,14.07l9,7 9,-7 -1.63,-1.27 -7.38,5.74zM12,16l7.36,-5.73L21,9l-9,-7 -9,7 1.63,1.27L12,16z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_logout_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5zM4,5h8V3H4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h8v-2H4V5z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_more_vert_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_open_in_browser_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M19,4L5,4c-1.11,0 -2,0.9 -2,2v12c0,1.1 0.89,2 2,2h4v-2L5,18L5,8h14v10h-4v2h4c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.89,-2 -2,-2zM12,10l-4,4h3v6h2v-6h3l-4,-4z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_open_in_new_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_restart_alt_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M12,5V2L8,6l4,4V7c3.31,0 6,2.69 6,6c0,2.97 -2.17,5.43 -5,5.91v2.02c3.95,-0.49 7,-3.85 7,-7.93C20,8.58 16.42,5 12,5z\" />\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M6,13c0,-1.65 0.67,-3.15 1.76,-4.24L6.34,7.34C4.9,8.79 4,10.79 4,13c0,4.08 3.05,7.44 7,7.93v-2.02C8.17,18.43 6,15.97 6,13z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_save_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_select_all_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_baseline_sort_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <group\n        android:scaleX=\"1.1484\"\n        android:scaleY=\"1.1484\"\n        android:translateX=\"40.2192\"\n        android:translateY=\"40.2192\">\n        <path\n            android:fillColor=\"@android:color/white\"\n            android:pathData=\"M19.97,6.43L12,2L4.03,6.43L9.1,9.24C9.83,8.48 10.86,8 12,8s2.17,0.48 2.9,1.24L19.97,6.43zM10,12c0,-1.1 0.9,-2 2,-2s2,0.9 2,2s-0.9,2 -2,2S10,13.1 10,12zM11,21.44L3,17V8.14l5.13,2.85C8.04,11.31 8,11.65 8,12c0,1.86 1.27,3.43 3,3.87V21.44zM13,21.44v-5.57c1.73,-0.44 3,-2.01 3,-3.87c0,-0.35 -0.04,-0.69 -0.13,-1.01L21,8.14L21,17L13,21.44z\" />\n    </group>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_code_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M8.7,15.9L4.8,12l3.9,-3.9c0.39,-0.39 0.39,-1.01 0,-1.4 -0.39,-0.39 -1.01,-0.39 -1.4,0l-4.59,4.59c-0.39,0.39 -0.39,1.02 0,1.41l4.59,4.6c0.39,0.39 1.01,0.39 1.4,0 0.39,-0.39 0.39,-1.01 0,-1.4zM15.3,15.9l3.9,-3.9 -3.9,-3.9c-0.39,-0.39 -0.39,-1.01 0,-1.4 0.39,-0.39 1.01,-0.39 1.4,0l4.59,4.59c0.39,0.39 0.39,1.02 0,1.41l-4.59,4.6c-0.39,0.39 -1.01,0.39 -1.4,0 -0.39,-0.39 -0.39,-1.01 0,-1.4z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_compress_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M4,10L4,10c0,0.55 0.45,1 1,1h14c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H5C4.45,9 4,9.45 4,10z\" />\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M14.79,4H13V2c0,-0.55 -0.45,-1 -1,-1h0c-0.55,0 -1,0.45 -1,1v2H9.21C8.76,4 8.54,4.54 8.85,4.85l2.79,2.79c0.2,0.2 0.51,0.2 0.71,0l2.79,-2.79C15.46,4.54 15.24,4 14.79,4z\" />\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M9.21,19H11v2c0,0.55 0.45,1 1,1h0c0.55,0 1,-0.45 1,-1v-2h1.79c0.45,0 0.67,-0.54 0.35,-0.85l-2.79,-2.79c-0.2,-0.2 -0.51,-0.2 -0.71,0l-2.79,2.79C8.54,18.46 8.76,19 9.21,19z\" />\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M5,14h14c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H5c-0.55,0 -1,0.45 -1,1v0C4,13.55 4.45,14 5,14z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_content_cut_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M9.64,7.64c0.29,-0.62 0.42,-1.33 0.34,-2.09 -0.19,-1.73 -1.54,-3.2 -3.26,-3.49 -2.77,-0.48 -5.14,1.89 -4.66,4.65 0.3,1.72 1.76,3.07 3.49,3.26 0.76,0.08 1.46,-0.05 2.09,-0.34L10,12l-2.36,2.36c-0.62,-0.29 -1.33,-0.42 -2.09,-0.34 -1.73,0.19 -3.2,1.54 -3.49,3.26 -0.48,2.77 1.89,5.13 4.65,4.65 1.72,-0.3 3.07,-1.76 3.26,-3.49 0.08,-0.76 -0.05,-1.46 -0.34,-2.09L12,14l7.59,7.59c0.89,0.89 2.41,0.26 2.41,-1v-0.01c0,-0.37 -0.15,-0.73 -0.41,-1L9.64,7.64zM6,8c-1.1,0 -2,-0.89 -2,-2s0.9,-2 2,-2 2,0.89 2,2 -0.9,2 -2,2zM6,20c-1.1,0 -2,-0.89 -2,-2s0.9,-2 2,-2 2,0.89 2,2 -0.9,2 -2,2zM12,12.5c-0.28,0 -0.5,-0.22 -0.5,-0.5s0.22,-0.5 0.5,-0.5 0.5,0.22 0.5,0.5 -0.22,0.5 -0.5,0.5zM19.59,2.41L13,9l2,2 6.59,-6.59c0.26,-0.26 0.41,-0.62 0.41,-1L22,3.4c0,-1.25 -1.52,-1.88 -2.41,-0.99z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_delete_forever_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6V19zM9.17,12.59c-0.39,-0.39 -0.39,-1.02 0,-1.41c0.39,-0.39 1.02,-0.39 1.41,0L12,12.59l1.41,-1.41c0.39,-0.39 1.02,-0.39 1.41,0s0.39,1.02 0,1.41L13.41,14l1.41,1.41c0.39,0.39 0.39,1.02 0,1.41s-1.02,0.39 -1.41,0L12,15.41l-1.41,1.41c-0.39,0.39 -1.02,0.39 -1.41,0c-0.39,-0.39 -0.39,-1.02 0,-1.41L10.59,14L9.17,12.59zM18,4h-2.5l-0.71,-0.71C14.61,3.11 14.35,3 14.09,3H9.91c-0.26,0 -0.52,0.11 -0.7,0.29L8.5,4H6C5.45,4 5,4.45 5,5s0.45,1 1,1h12c0.55,0 1,-0.45 1,-1S18.55,4 18,4z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_edit_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M3,17.46v3.04c0,0.28 0.22,0.5 0.5,0.5h3.04c0.13,0 0.26,-0.05 0.35,-0.15L17.81,9.94l-3.75,-3.75L3.15,17.1c-0.1,0.1 -0.15,0.22 -0.15,0.36zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_edit_note_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M14,11c0,0.55 -0.45,1 -1,1H4c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h9C13.55,10 14,10.45 14,11zM3,7c0,0.55 0.45,1 1,1h9c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1H4C3.45,6 3,6.45 3,7zM10,15c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1s0.45,1 1,1h5C9.55,16 10,15.55 10,15zM18.01,12.87l0.71,-0.71c0.39,-0.39 1.02,-0.39 1.41,0l0.71,0.71c0.39,0.39 0.39,1.02 0,1.41l-0.71,0.71L18.01,12.87zM17.3,13.58l-5.16,5.16C12.05,18.83 12,18.95 12,19.09v1.41c0,0.28 0.22,0.5 0.5,0.5h1.41c0.13,0 0.26,-0.05 0.35,-0.15l5.16,-5.16L17.3,13.58z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_exit_to_app_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M10.79,16.29c0.39,0.39 1.02,0.39 1.41,0l3.59,-3.59c0.39,-0.39 0.39,-1.02 0,-1.41L12.2,7.7c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41L12.67,11H4c-0.55,0 -1,0.45 -1,1s0.45,1 1,1h8.67l-1.88,1.88c-0.39,0.39 -0.38,1.03 0,1.41zM19,3H5c-1.11,0 -2,0.9 -2,2v3c0,0.55 0.45,1 1,1s1,-0.45 1,-1V6c0,-0.55 0.45,-1 1,-1h12c0.55,0 1,0.45 1,1v12c0,0.55 -0.45,1 -1,1H6c-0.55,0 -1,-0.45 -1,-1v-2c0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1v3c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_home_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M10,19v-5h4v5c0,0.55 0.45,1 1,1h3c0.55,0 1,-0.45 1,-1v-7h1.7c0.46,0 0.68,-0.57 0.33,-0.87L12.67,3.6c-0.38,-0.34 -0.96,-0.34 -1.34,0l-8.36,7.53c-0.34,0.3 -0.13,0.87 0.33,0.87H5v7c0,0.55 0.45,1 1,1h3c0.55,0 1,-0.45 1,-1z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_insert_drive_file_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8.83c0,-0.53 -0.21,-1.04 -0.59,-1.41l-4.83,-4.83c-0.37,-0.38 -0.88,-0.59 -1.41,-0.59L6,2zM13,8L13,3.5L18.5,9L14,9c-0.55,0 -1,-0.45 -1,-1z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_key_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M20.59,10h-7.94C11.7,7.31 8.89,5.5 5.77,6.12c-2.29,0.46 -4.15,2.3 -4.63,4.58C0.32,14.58 3.26,18 7,18c2.61,0 4.83,-1.67 5.65,-4H13l1.29,1.29c0.39,0.39 1.02,0.39 1.41,0L17,14l1.29,1.29c0.39,0.39 1.03,0.39 1.42,0l2.59,-2.61c0.39,-0.39 0.39,-1.03 -0.01,-1.42l-0.99,-0.97C21.1,10.1 20.85,10 20.59,10zM7,15c-1.65,0 -3,-1.35 -3,-3c0,-1.65 1.35,-3 3,-3s3,1.35 3,3C10,13.65 8.65,15 7,15z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_manage_search_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M6,9H3C2.45,9 2,8.55 2,8v0c0,-0.55 0.45,-1 1,-1h3c0.55,0 1,0.45 1,1v0C7,8.55 6.55,9 6,9zM6,12H3c-0.55,0 -1,0.45 -1,1v0c0,0.55 0.45,1 1,1h3c0.55,0 1,-0.45 1,-1v0C7,12.45 6.55,12 6,12zM19.88,18.29l-3.12,-3.12c-0.86,0.56 -1.89,0.88 -3,0.82c-2.37,-0.11 -4.4,-1.96 -4.72,-4.31C8.6,8.33 11.49,5.5 14.87,6.07c1.95,0.33 3.57,1.85 4,3.78c0.33,1.46 0.01,2.82 -0.7,3.9l3.13,3.13c0.39,0.39 0.39,1.02 0,1.41l0,0C20.91,18.68 20.27,18.68 19.88,18.29zM17,11c0,-1.65 -1.35,-3 -3,-3s-3,1.35 -3,3s1.35,3 3,3S17,12.65 17,11zM3,19h8c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H3c-0.55,0 -1,0.45 -1,1v0C2,18.55 2.45,19 3,19z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_menu_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M4,18h16c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L4,16c-0.55,0 -1,0.45 -1,1s0.45,1 1,1zM4,13h16c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L4,11c-0.55,0 -1,0.45 -1,1s0.45,1 1,1zM3,7c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L4,6c-0.55,0 -1,0.45 -1,1z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_play_arrow_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M8,6.82v10.36c0,0.79 0.87,1.27 1.54,0.84l8.14,-5.18c0.62,-0.39 0.62,-1.29 0,-1.69L9.54,5.98C8.87,5.55 8,6.03 8,6.82z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_redo_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M18.4,10.6C16.55,8.99 14.15,8 11.5,8c-4.16,0 -7.74,2.42 -9.44,5.93 -0.32,0.67 0.04,1.47 0.75,1.71 0.59,0.2 1.23,-0.08 1.5,-0.64 1.3,-2.66 4.03,-4.5 7.19,-4.5 1.95,0 3.73,0.72 5.12,1.88l-1.91,1.91c-0.63,0.63 -0.19,1.71 0.7,1.71H21c0.55,0 1,-0.45 1,-1V9.41c0,-0.89 -1.08,-1.34 -1.71,-0.71l-1.89,1.9z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_search_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M15.5,14h-0.79l-0.28,-0.27c1.2,-1.4 1.82,-3.31 1.48,-5.34 -0.47,-2.78 -2.79,-5 -5.59,-5.34 -4.23,-0.52 -7.79,3.04 -7.27,7.27 0.34,2.8 2.56,5.12 5.34,5.59 2.03,0.34 3.94,-0.28 5.34,-1.48l0.27,0.28v0.79l4.25,4.25c0.41,0.41 1.08,0.41 1.49,0 0.41,-0.41 0.41,-1.08 0,-1.49L15.5,14zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_settings_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_share_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92s2.92,-1.31 2.92,-2.92 -1.31,-2.92 -2.92,-2.92z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_tab_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM20,19L4,19c-0.55,0 -1,-0.45 -1,-1L3,6c0,-0.55 0.45,-1 1,-1h9v3c0,0.55 0.45,1 1,1h7v9c0,0.55 -0.45,1 -1,1z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_timelapse_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M16.24,7.76C15.07,6.59 13.54,6 12,6v6l-4.24,4.24c2.34,2.34 6.14,2.34 8.49,0 2.34,-2.34 2.34,-6.14 -0.01,-8.48zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_round_undo_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:autoMirrored=\"true\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorOnSurface\"\n        android:pathData=\"M12.5,8c-2.65,0 -5.05,0.99 -6.9,2.6L3.71,8.71C3.08,8.08 2,8.52 2,9.41V15c0,0.55 0.45,1 1,1h5.59c0.89,0 1.34,-1.08 0.71,-1.71l-1.91,-1.91c1.39,-1.16 3.16,-1.88 5.12,-1.88 3.16,0 5.89,1.84 7.19,4.5 0.27,0.56 0.91,0.84 1.5,0.64 0.71,-0.23 1.07,-1.04 0.75,-1.72C20.23,10.42 16.65,8 12.5,8z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.drawerlayout.widget.DrawerLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/drawer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\"com.raival.fileexplorer.activity.MainActivity\">\n    <!-- Main Layout -->\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <com.google.android.material.appbar.MaterialToolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/Widget.Material3.Toolbar.Surface\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:elevation=\"3dp\"\n            app:subtitleTextAppearance=\"@style/TextAppearance.Material3.BodySmall\"\n            app:titleTextAppearance=\"@style/TextAppearance.Material3.TitleMedium\" />\n\n        <com.google.android.material.card.MaterialCardView\n            style=\"@style/Widget.Material3.CardView.Elevated\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:cardCornerRadius=\"0dp\"\n            app:cardElevation=\"3dp\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center\"\n                android:orientation=\"horizontal\">\n\n                <com.google.android.material.imageview.ShapeableImageView\n                    android:id=\"@+id/tabs_options\"\n                    android:layout_width=\"56dp\"\n                    android:layout_height=\"match_parent\"\n                    android:background=\"?android:attr/selectableItemBackground\"\n                    android:clickable=\"true\"\n                    android:scaleType=\"centerInside\"\n                    android:src=\"@drawable/ic_baseline_add_24\" />\n\n                <com.raival.fileexplorer.common.view.TabView\n                    android:id=\"@+id/tabs\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"40dp\" />\n            </LinearLayout>\n        </com.google.android.material.card.MaterialCardView>\n\n        <androidx.fragment.app.FragmentContainerView\n            android:id=\"@+id/fragment_container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0dp\"\n            android:layout_weight=\"1\" />\n\n        <com.google.android.material.card.MaterialCardView\n            style=\"@style/Widget.Material3.CardView.Elevated\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:cardCornerRadius=\"0dp\"\n            app:cardElevation=\"3dp\">\n\n            <com.raival.fileexplorer.common.view.BottomBarView\n                android:id=\"@+id/bottom_bar_view\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"56dp\" />\n        </com.google.android.material.card.MaterialCardView>\n    </LinearLayout>\n\n    <!-- Drawer Layout -->\n    <include\n        android:id=\"@+id/drawer_layout\"\n        layout=\"@layout/activity_main_drawer\" />\n</androidx.drawerlayout.widget.DrawerLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_main_drawer.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_gravity=\"start\"\n    android:background=\"?android:attr/colorBackground\"\n    android:clickable=\"true\"\n    android:focusable=\"true\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.appbar.MaterialToolbar\n        android:id=\"@+id/toolbar\"\n        style=\"@style/Widget.Material3.Toolbar.Surface\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:elevation=\"3dp\"\n        app:subtitleTextAppearance=\"@style/TextAppearance.Material3.BodySmall\"\n        app:titleTextAppearance=\"@style/TextAppearance.Material3.TitleMedium\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:padding=\"16dp\">\n\n        <com.google.android.material.textview.MaterialTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"12dp\"\n            android:alpha=\"0.7\"\n            android:text=\"Storage\"\n            android:textSize=\"14sp\" />\n\n        <!-- Storage Directory -->\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"12dp\"\n            android:clickable=\"true\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:layout_width=\"30dp\"\n                android:layout_height=\"30dp\"\n                android:layout_marginEnd=\"12dp\"\n                android:src=\"@drawable/ic_baseline_folder_open_24\" />\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center\"\n                android:orientation=\"vertical\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:paddingVertical=\"2dp\"\n                    android:text=\"Storage Directory\"\n                    android:textSize=\"14sp\" />\n\n                <com.google.android.material.progressindicator.LinearProgressIndicator\n                    android:id=\"@+id/storage_space_progress\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:paddingVertical=\"2dp\"\n                    android:progress=\"50\"\n                    app:trackCornerRadius=\"16dp\" />\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:id=\"@+id/storage_space\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.7\"\n                    android:paddingVertical=\"2dp\"\n                    android:textSize=\"10sp\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <!-- Root Directory -->\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:clickable=\"true\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:layout_width=\"30dp\"\n                android:layout_height=\"30dp\"\n                android:layout_marginEnd=\"12dp\"\n                android:src=\"@drawable/ic_baseline_folder_open_24\" />\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center\"\n                android:orientation=\"vertical\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:paddingVertical=\"2dp\"\n                    android:text=\"Root Directory\"\n                    android:textSize=\"14sp\" />\n\n                <com.google.android.material.progressindicator.LinearProgressIndicator\n                    android:id=\"@+id/root_space_progress\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:paddingVertical=\"2dp\"\n                    android:progress=\"88\"\n                    app:trackCornerRadius=\"16dp\" />\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:id=\"@+id/root_space\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.7\"\n                    android:paddingVertical=\"2dp\"\n                    android:textSize=\"10sp\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <com.google.android.material.textview.MaterialTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginVertical=\"12dp\"\n            android:alpha=\"0.7\"\n            android:text=\"Tools\"\n            android:textSize=\"14sp\" />\n\n        <!-- Apps -->\n        <com.google.android.material.card.MaterialCardView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:strokeWidth=\"0dp\">\n\n            <LinearLayout\n                android:id=\"@+id/apps\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"?android:attr/selectableItemBackground\"\n                android:clickable=\"true\"\n                android:gravity=\"center\"\n                android:orientation=\"horizontal\"\n                android:paddingVertical=\"8dp\">\n\n                <com.google.android.material.imageview.ShapeableImageView\n                    android:layout_width=\"30dp\"\n                    android:layout_height=\"30dp\"\n                    android:layout_marginEnd=\"12dp\"\n                    android:src=\"@drawable/ic_baseline_layers_24\" />\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:gravity=\"center\"\n                    android:orientation=\"vertical\">\n\n                    <com.google.android.material.textview.MaterialTextView\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:paddingVertical=\"2dp\"\n                        android:text=\"App Manager\"\n                        android:textSize=\"14sp\" />\n\n                    <com.google.android.material.textview.MaterialTextView\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:alpha=\"0.7\"\n                        android:paddingVertical=\"2dp\"\n                        android:text=\"extract APK files from the installed apps\"\n                        android:textSize=\"10sp\" />\n                </LinearLayout>\n            </LinearLayout>\n        </com.google.android.material.card.MaterialCardView>\n\n        <com.google.android.material.textview.MaterialTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginVertical=\"12dp\"\n            android:alpha=\"0.7\"\n            android:text=\"Bookmarks\"\n            android:textSize=\"14sp\" />\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/rv\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main_drawer_bookmark_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.card.MaterialCardView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:elevation=\"0dp\"\n    app:cardBackgroundColor=\"@android:color/transparent\"\n    app:strokeWidth=\"0dp\">\n\n    <LinearLayout\n        android:id=\"@+id/background\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:attr/selectableItemBackground\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\"\n        android:paddingVertical=\"8dp\">\n\n        <com.google.android.material.imageview.ShapeableImageView\n            android:id=\"@+id/icon\"\n            android:layout_width=\"30dp\"\n            android:layout_height=\"30dp\"\n            android:layout_marginEnd=\"12dp\"\n            android:src=\"@drawable/ic_baseline_layers_24\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:orientation=\"vertical\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/name\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:paddingTop=\"2dp\"\n                android:text=\"App Manager\"\n                android:textSize=\"14sp\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/details\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:alpha=\"0.7\"\n                android:paddingBottom=\"2dp\"\n                android:text=\"extract APK files from the installed apps\"\n                android:textSize=\"10sp\" />\n        </LinearLayout>\n    </LinearLayout>\n</com.google.android.material.card.MaterialCardView>"
  },
  {
    "path": "app/src/main/res/layout/apps_tab_app_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:id=\"@+id/background\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:attr/selectableItemBackground\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:id=\"@+id/app_icon\"\n                android:layout_width=\"36dp\"\n                android:layout_height=\"36dp\"\n                android:layout_marginStart=\"4dp\"\n                android:scaleType=\"fitXY\"\n                app:shapeAppearanceOverlay=\"@style/circleImageView\" />\n        </LinearLayout>\n\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/app_name\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingEnd=\"8dp\"\n                android:singleLine=\"true\"\n                android:text=\"loading...\"\n                android:textSize=\"14sp\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/app_pkg\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingEnd=\"8dp\"\n                android:text=\"loading...\"\n                android:textSize=\"10sp\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/app_details\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingEnd=\"8dp\"\n                android:text=\"loading...\"\n                android:textSize=\"10sp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <com.google.android.material.divider.MaterialDivider\n        android:id=\"@+id/divider\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:layout_marginStart=\"64dp\"\n        android:alpha=\"0.5\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/apps_tab_fragment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.progressindicator.CircularProgressIndicator\n        android:id=\"@+id/progress\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:indeterminate=\"true\"\n        android:padding=\"8dp\" />\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/rv\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:visibility=\"gone\"\n        app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/bottom_bar_menu_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"0dp\"\n    android:layout_height=\"match_parent\"\n    android:layout_weight=\"1\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:clickable=\"true\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.imageview.ShapeableImageView\n        android:id=\"@+id/icon\"\n        android:layout_width=\"21dp\"\n        android:layout_height=\"21dp\"\n        android:layout_marginBottom=\"2dp\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/label\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"11sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/common_custom_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:padding=\"12dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <com.google.android.material.imageview.ShapeableImageView\n            android:id=\"@+id/dialog_icon\"\n            android:layout_width=\"30dp\"\n            android:layout_height=\"30dp\"\n            android:layout_margin=\"8dp\"\n            android:visibility=\"gone\" />\n\n        <com.google.android.material.textview.MaterialTextView\n            android:id=\"@+id/dialog_title\"\n            style=\"@style/Theme.Material3.Light.Dialog.Alert\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"8dp\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"normal\"\n            android:visibility=\"gone\" />\n    </LinearLayout>\n\n    <androidx.core.widget.NestedScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/dialog_msg\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:padding=\"8dp\"\n                android:text=\"\"\n                android:textIsSelectable=\"true\"\n                android:textSize=\"14sp\"\n                android:textStyle=\"normal\"\n                android:visibility=\"gone\" />\n\n            <LinearLayout\n                android:id=\"@+id/dialog_container\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"vertical\"\n                android:padding=\"8dp\"\n                android:visibility=\"gone\" />\n        </LinearLayout>\n\n    </androidx.core.widget.NestedScrollView>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"end\"\n        android:orientation=\"horizontal\"\n        android:padding=\"8dp\">\n\n        <com.google.android.material.button.MaterialButton\n            android:id=\"@+id/dialog_neutral_button\"\n            style=\"@style/Widget.Material3.Button\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:visibility=\"gone\" />\n\n        <Space\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\" />\n\n        <com.google.android.material.button.MaterialButton\n            android:id=\"@+id/dialog_negative_button\"\n            style=\"@style/Widget.Material3.Button\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginStart=\"12dp\"\n            android:visibility=\"gone\" />\n\n        <com.google.android.material.button.MaterialButton\n            android:id=\"@+id/dialog_positive_button\"\n            style=\"@style/Widget.Material3.Button\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginStart=\"12dp\"\n            android:visibility=\"gone\" />\n\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/common_options_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"8dp\"\n        android:layout_marginTop=\"8dp\"\n        android:layout_marginRight=\"8dp\"\n        android:padding=\"8dp\"\n        android:text=\"This is Title\"\n        android:textSize=\"16sp\"\n        android:textStyle=\"bold\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/msg\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"8dp\"\n        android:layout_marginTop=\"4dp\"\n        android:layout_marginRight=\"8dp\"\n        android:padding=\"8dp\"\n        android:text=\"This is Title\"\n        android:textSize=\"13sp\"\n        android:textStyle=\"normal\" />\n\n    <androidx.core.widget.NestedScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginTop=\"8dp\"\n        android:fillViewport=\"true\">\n\n        <LinearLayout\n            android:id=\"@+id/container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\" />\n    </androidx.core.widget.NestedScrollView>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/common_options_dialog_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/background\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:clickable=\"true\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\"\n    android:padding=\"8dp\">\n\n    <com.google.android.material.imageview.ShapeableImageView\n        android:id=\"@+id/icon\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_marginLeft=\"8dp\"\n        android:layout_marginTop=\"2dp\"\n        android:layout_marginRight=\"8dp\"\n        android:layout_marginBottom=\"2dp\"\n        android:focusable=\"false\"\n        android:scaleType=\"fitXY\"\n        android:visibility=\"gone\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/label\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:focusable=\"false\"\n        android:padding=\"8dp\"\n        android:text=\"this is an option\"\n        android:textSize=\"16sp\"\n        android:textStyle=\"normal\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_file_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:id=\"@+id/background\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:attr/selectableItemBackground\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:id=\"@+id/icon_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:id=\"@+id/file_icon\"\n                android:layout_width=\"36dp\"\n                android:layout_height=\"36dp\"\n                android:layout_marginStart=\"4dp\"\n                android:scaleType=\"fitCenter\"\n                app:shapeAppearanceOverlay=\"@style/circleImageView\" />\n        </LinearLayout>\n\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/file_name\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingEnd=\"8dp\"\n                android:maxLines=\"2\"\n                android:text=\"loading...\"\n                android:textSize=\"14sp\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/file_details\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingEnd=\"8dp\"\n                android:text=\"loading...\"\n                android:textSize=\"10sp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <com.google.android.material.divider.MaterialDivider\n        android:id=\"@+id/divider\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:layout_marginStart=\"64dp\"\n        android:alpha=\"0.5\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_fragment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:id=\"@+id/path_history_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\"\n        android:paddingStart=\"8dp\"\n        android:paddingEnd=\"8dp\"\n        app:layout_constraintTop_toTopOf=\"parent\">\n\n        <com.google.android.material.imageview.ShapeableImageView\n            android:id=\"@+id/home\"\n            android:layout_width=\"40dp\"\n            android:layout_height=\"match_parent\"\n            android:background=\"?android:attr/selectableItemBackgroundBorderless\"\n            android:clickable=\"true\"\n            android:paddingHorizontal=\"8dp\"\n            android:paddingVertical=\"8dp\"\n            android:src=\"@drawable/ic_round_home_24\" />\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/path_history\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\"\n            tools:itemCount=\"2\" />\n    </LinearLayout>\n\n    <com.google.android.material.divider.MaterialDivider\n        android:id=\"@+id/divider\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:alpha=\"0.5\"\n        app:layout_constraintTop_toBottomOf=\"@+id/path_history_layout\" />\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/rv\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:fadeScrollbars=\"true\"\n        android:nestedScrollingEnabled=\"false\"\n        android:paddingRight=\"10dp\"\n        android:scrollbarSize=\"10dp\"\n        android:scrollbarThumbVertical=\"@drawable/fastscroll_thumb\"\n        android:scrollbars=\"vertical\"\n        app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/divider\" />\n\n    <include\n        android:id=\"@+id/place_holder\"\n        layout=\"@layout/file_explorer_tab_placeholder\"\n        android:visibility=\"gone\" />\n\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_info_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:id=\"@+id/icon_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:id=\"@+id/file_icon\"\n                android:layout_width=\"36dp\"\n                android:layout_height=\"36dp\"\n                android:layout_marginStart=\"4dp\"\n                android:scaleType=\"fitXY\"\n                android:src=\"@drawable/ic_baseline_folder_24\"\n                app:shapeAppearanceOverlay=\"@style/circleImageView\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/file_name\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:maxLines=\"1\"\n                android:paddingEnd=\"8dp\"\n                android:text=\"file name\"\n                android:textSize=\"16sp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n\n    <androidx.core.widget.NestedScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:fillViewport=\"true\">\n\n        <LinearLayout\n            android:id=\"@+id/container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:padding=\"8dp\" />\n    </androidx.core.widget.NestedScrollView>\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_info_dialog_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\"\n    android:padding=\"4dp\">\n\n    <com.google.android.material.textfield.TextInputLayout\n        android:id=\"@+id/item\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:inputType=\"none\">\n\n        <com.google.android.material.textfield.TextInputEditText\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n    </com.google.android.material.textfield.TextInputLayout>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_path_history_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/background\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"match_parent\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:clickable=\"true\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\"\n    android:paddingHorizontal=\"2dp\">\n\n    <com.google.android.material.imageview.ShapeableImageView\n        android:layout_width=\"18dp\"\n        android:layout_height=\"18dp\"\n        android:paddingHorizontal=\"2dp\"\n        android:src=\"@drawable/ic_round_play_arrow_24\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/text\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:focusable=\"false\"\n        android:gravity=\"center\"\n        android:paddingHorizontal=\"2dp\"\n        android:textSize=\"14sp\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_placeholder.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.imageview.ShapeableImageView\n        android:layout_width=\"55dp\"\n        android:layout_height=\"55dp\"\n        android:src=\"@drawable/ic_round_insert_drive_file_24\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"No Files\"\n        android:textSize=\"24sp\"\n        android:textStyle=\"bold\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_task_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:minHeight=\"200dp\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <com.google.android.material.textview.MaterialTextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"8dp\"\n        android:layout_marginBottom=\"8dp\"\n        android:padding=\"8dp\"\n        android:text=\"Available Tasks\"\n        android:textSize=\"16sp\"\n        android:textStyle=\"bold\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/place_holder\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center\"\n        android:text=\"No Tasks Found\"\n        android:textSize=\"16sp\"\n        android:textStyle=\"bold\" />\n\n    <androidx.core.widget.NestedScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:fillViewport=\"true\">\n\n        <LinearLayout\n            android:id=\"@+id/container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\" />\n    </androidx.core.widget.NestedScrollView>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/file_explorer_tab_task_dialog_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/background\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:clickable=\"true\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:id=\"@+id/remove\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"fill_parent\"\n            android:gravity=\"center\"\n            android:padding=\"8dp\">\n\n            <com.google.android.material.imageview.ShapeableImageView\n                android:layout_width=\"20dp\"\n                android:layout_height=\"20dp\"\n                android:rotation=\"45\"\n                android:src=\"@drawable/ic_baseline_add_24\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\"\n            android:paddingStart=\"4dp\"\n            android:paddingTop=\"8dp\"\n            android:paddingEnd=\"4dp\"\n            android:paddingBottom=\"12dp\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/label\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:maxLines=\"1\"\n                android:paddingBottom=\"3dp\"\n                android:text=\"7 files copied\"\n                android:textSize=\"16sp\"\n                android:textStyle=\"normal\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/task_details\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:alpha=\"0.6\"\n                android:maxLines=\"2\"\n                android:text=\"from: /sdcard/download\"\n                android:textSize=\"12sp\"\n                android:textStyle=\"normal\" />\n\n        </LinearLayout>\n    </LinearLayout>\n\n    <com.google.android.material.divider.MaterialDivider\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:alpha=\"0.6\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/input.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.textfield.TextInputLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginTop=\"8dp\"\n    android:layout_marginBottom=\"8dp\">\n\n    <com.google.android.material.textfield.TextInputEditText\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" />\n</com.google.android.material.textfield.TextInputLayout>"
  },
  {
    "path": "app/src/main/res/layout/progress_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\">\n\n    <ProgressBar\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"8dp\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/msg\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"8dp\"\n        android:text=\"Loading...\"\n        android:textSize=\"16sp\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/search_fragment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <com.google.android.material.textfield.TextInputLayout\n        android:id=\"@+id/input\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"Search\"\n        app:startIconDrawable=\"@drawable/ic_round_search_24\">\n\n        <com.google.android.material.textfield.TextInputEditText\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n    </com.google.android.material.textfield.TextInputLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <com.google.android.material.checkbox.MaterialCheckBox\n            android:id=\"@+id/search_option_deep_search\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Deep search\" />\n\n        <com.google.android.material.checkbox.MaterialCheckBox\n            android:id=\"@+id/search_option_optimized_searching\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:checked=\"true\"\n            android:text=\"Optimized searching\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <com.google.android.material.checkbox.MaterialCheckBox\n            android:id=\"@+id/search_option_suffix\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Suffix\" />\n\n        <com.google.android.material.checkbox.MaterialCheckBox\n            android:id=\"@+id/search_option_prefix\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Prefix\" />\n\n        <com.google.android.material.checkbox.MaterialCheckBox\n            android:id=\"@+id/search_option_regex\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"RegEx\" />\n    </LinearLayout>\n\n    <com.google.android.material.button.MaterialButton\n        android:id=\"@+id/search_button\"\n        style=\"@style/Widget.Material3.Button\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Search\" />\n\n    <ProgressBar\n        android:id=\"@+id/progress\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:layout_marginTop=\"8dp\" />\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/file_count\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"8dp\"\n        android:text=\"found 0 item\" />\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/rv\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/settings_activity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.appbar.MaterialToolbar\n        android:id=\"@+id/toolbar\"\n        style=\"@style/Widget.Material3.Toolbar.Surface\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:elevation=\"3dp\" />\n\n    <androidx.core.widget.NestedScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:fillViewport=\"true\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\">\n\n            <com.google.android.material.textview.MaterialTextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"4dp\"\n                android:text=\"Appearance\"\n                android:textColor=\"?attr/colorPrimary\"\n                android:textSize=\"14sp\" />\n\n            <!-- Theme -->\n            <LinearLayout\n                android:id=\"@+id/settings_theme\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"?android:selectableItemBackground\"\n                android:clickable=\"true\"\n                android:orientation=\"vertical\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"8dp\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"Theme\"\n                    android:textSize=\"16sp\" />\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:id=\"@+id/settings_theme_value\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.7\"\n                    android:text=\"System default\"\n                    android:textSize=\"12sp\" />\n            </LinearLayout>\n\n            <!-- show bottom bar labels -->\n            <LinearLayout\n                android:id=\"@+id/settings_bottom_toolbar_labels\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"?android:selectableItemBackground\"\n                android:clickable=\"true\"\n                android:orientation=\"horizontal\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"4dp\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Show bottom toolbar labels\"\n                    android:textSize=\"16sp\" />\n\n                <androidx.appcompat.widget.SwitchCompat\n                    android:id=\"@+id/settings_bottom_toolbar_labels_value\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:clickable=\"false\"\n                    android:focusable=\"false\"\n                    app:showText=\"false\"\n                    tools:ignore=\"UseSwitchCompatOrMaterialXml\" />\n            </LinearLayout>\n\n            <Space\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"16dp\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"4dp\"\n                android:text=\"General\"\n                android:textColor=\"?attr/colorPrimary\"\n                android:textSize=\"14sp\" />\n\n            <!-- Log mode -->\n            <LinearLayout\n                android:id=\"@+id/settings_log_mode\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"?android:selectableItemBackground\"\n                android:clickable=\"true\"\n                android:orientation=\"vertical\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"8dp\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"Log mode\"\n                    android:textSize=\"16sp\" />\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:id=\"@+id/settings_log_mode_value\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.7\"\n                    android:text=\"Errors only\"\n                    android:textSize=\"12sp\" />\n            </LinearLayout>\n\n            <!-- Deep Search File Size Limit -->\n            <LinearLayout\n                android:id=\"@+id/settings_deep_search_limit\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"?android:selectableItemBackground\"\n                android:clickable=\"true\"\n                android:orientation=\"vertical\"\n                android:paddingHorizontal=\"16dp\"\n                android:paddingVertical=\"8dp\">\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"Deep search file size limit\"\n                    android:textSize=\"16sp\" />\n\n                <com.google.android.material.textview.MaterialTextView\n                    android:id=\"@+id/settings_deep_search_limit_value\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.7\"\n                    android:textSize=\"12sp\" />\n            </LinearLayout>\n\n        </LinearLayout>\n    </androidx.core.widget.NestedScrollView>\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/text_editor_activity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <com.google.android.material.appbar.MaterialToolbar\n        android:id=\"@+id/toolbar\"\n        style=\"@style/Widget.Material3.Toolbar.Surface\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:elevation=\"3dp\" />\n\n    <io.github.rosemoe.sora.widget.CodeEditor\n        android:id=\"@+id/editor\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\" />\n\n    <HorizontalScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"36dp\"\n        android:scrollbars=\"none\">\n\n        <com.raival.fileexplorer.activity.editor.view.SymbolInputView\n            android:id=\"@+id/symbol_input\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"36dp\" />\n    </HorizontalScrollView>\n\n    <com.google.android.material.card.MaterialCardView\n        style=\"@style/Widget.Material3.CardView.Elevated\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:cardCornerRadius=\"0dp\"\n        app:cardElevation=\"3dp\">\n\n        <LinearLayout\n            android:id=\"@+id/search_panel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:paddingLeft=\"8dp\"\n            android:paddingTop=\"8dp\"\n            android:paddingRight=\"8dp\"\n            android:visibility=\"gone\"\n            tools:ignore=\"HardcodedText\">\n\n            <com.google.android.material.textfield.TextInputLayout\n                android:id=\"@+id/find_input\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <com.google.android.material.textfield.TextInputEditText\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\" />\n            </com.google.android.material.textfield.TextInputLayout>\n\n            <com.google.android.material.textfield.TextInputLayout\n                android:id=\"@+id/replace_input\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"8dp\">\n\n                <com.google.android.material.textfield.TextInputEditText\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\" />\n            </com.google.android.material.textfield.TextInputLayout>\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\">\n\n                <com.google.android.material.button.MaterialButton\n                    android:id=\"@+id/replace\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_margin=\"3dp\"\n                    android:layout_marginEnd=\"2dp\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Rep\" />\n\n                <com.google.android.material.button.MaterialButton\n                    android:id=\"@+id/replace_all\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_margin=\"3dp\"\n                    android:layout_marginEnd=\"2dp\"\n                    android:layout_weight=\"1\"\n                    android:text=\"All\" />\n\n                <com.google.android.material.button.MaterialButton\n                    android:id=\"@+id/previous\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_margin=\"3dp\"\n                    android:layout_marginEnd=\"2dp\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Prev\" />\n\n                <com.google.android.material.button.MaterialButton\n                    android:id=\"@+id/next\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_margin=\"3dp\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Next\" />\n            </LinearLayout>\n        </LinearLayout>\n    </com.google.android.material.card.MaterialCardView>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/text_editor_completion_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"?attr/selectableItemBackground\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"horizontal\">\n\n    <com.google.android.material.textview.MaterialTextView\n        android:id=\"@+id/result_item_image\"\n        android:layout_width=\"30dp\"\n        android:layout_height=\"match_parent\"\n        android:fontFamily=\"monospace\"\n        android:gravity=\"center\"\n        android:paddingHorizontal=\"8dp\"\n        android:text=\"K\"\n        android:textSize=\"20sp\"\n        android:textStyle=\"bold\" />\n\n    <LinearLayout\n        android:layout_width=\"1px\"\n        android:layout_height=\"match_parent\"\n        android:background=\"?attr/colorOnSurface\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"vertical\"\n        android:padding=\"8dp\">\n\n        <com.google.android.material.textview.MaterialTextView\n            android:id=\"@+id/result_item_label\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Medium Text\"\n            android:textSize=\"16sp\" />\n\n        <com.google.android.material.textview.MaterialTextView\n            android:id=\"@+id/result_item_desc\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Small Text\"\n            android:textSize=\"12sp\" />\n    </LinearLayout>\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/menu/main_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item\n        android:icon=\"@drawable/ic_baseline_assignment_24\"\n        android:title=\"Logs\" />\n</menu>"
  },
  {
    "path": "app/src/main/res/menu/tab_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item\n        android:id=\"@+id/close\"\n        android:title=\"Close\" />\n    <item\n        android:id=\"@+id/close_others\"\n        android:title=\"Close Others\" />\n    <item\n        android:id=\"@+id/close_all\"\n        android:title=\"Close all\" />\n</menu>"
  },
  {
    "path": "app/src/main/res/menu/text_editor_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n    <item\n        android:id=\"@+id/editor_option_text_undo\"\n        android:icon=\"@drawable/ic_round_undo_24\"\n        android:title=\"Undo\" />\n    <item\n        android:id=\"@+id/editor_option_text_redo\"\n        android:icon=\"@drawable/ic_round_redo_24\"\n        android:title=\"Redo\" />\n    <item\n        android:id=\"@+id/editor_option_search\"\n        android:icon=\"@drawable/ic_round_search_24\"\n        android:title=\"Search\" />\n\n    <item\n        android:icon=\"@drawable/ic_baseline_layers_24\"\n        android:title=\"Languages\">\n        <menu>\n            <group android:checkableBehavior=\"single\">\n                <item\n                    android:id=\"@+id/editor_language_def\"\n                    android:checked=\"true\"\n                    android:title=\"Auto\" />\n                <item\n                    android:id=\"@+id/editor_language_java\"\n                    android:title=\"Java\" />\n                <item\n                    android:id=\"@+id/editor_language_kotlin\"\n                    android:title=\"Kotlin\" />\n            </group>\n        </menu>\n    </item>\n\n    <item\n        android:icon=\"@drawable/ic_round_settings_24\"\n        android:title=\"Configuration\">\n        <menu>\n            <item\n                android:id=\"@+id/editor_option_wordwrap\"\n                android:checkable=\"true\"\n                android:title=\"Word wrap\" />\n            <item\n                android:id=\"@+id/editor_option_line_number\"\n                android:checkable=\"true\"\n                android:checked=\"true\"\n                android:title=\"Show line number\" />\n            <item\n                android:id=\"@+id/editor_option_pin_line_number\"\n                android:checkable=\"true\"\n                android:title=\"Pin line number\" />\n            <item\n                android:id=\"@+id/editor_option_magnifier\"\n                android:checkable=\"true\"\n                android:checked=\"true\"\n                android:title=\"Magnifier\" />\n            <item\n                android:id=\"@+id/editor_option_autocomplete\"\n                android:checkable=\"true\"\n                android:checked=\"false\"\n                android:title=\"Autocomplete\" />\n            <item\n                android:id=\"@+id/editor_option_read_only\"\n                android:checkable=\"true\"\n                android:checked=\"false\"\n                android:title=\"Read only\" />\n        </menu>\n    </item>\n\n    <item\n        android:id=\"@+id/editor_format\"\n        android:icon=\"@drawable/ic_baseline_sort_24\"\n        android:title=\"Format\" />\n    <item\n        android:id=\"@+id/editor_option_save\"\n        android:icon=\"@drawable/ic_baseline_save_24\"\n        android:title=\"Save\"\n        app:showAsAction=\"always\" />\n</menu>\n"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/app_icon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/app_icon_background\" />\n    <foreground android:drawable=\"@drawable/app_icon_foreground\" />\n    <monochrome android:drawable=\"@drawable/app_icon_foreground\" />\n</adaptive-icon>\n"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/app_icon_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/app_icon_background\" />\n    <foreground android:drawable=\"@drawable/app_icon_foreground\" />\n    <monochrome android:drawable=\"@drawable/app_icon_foreground\" />\n</adaptive-icon>\n"
  },
  {
    "path": "app/src/main/res/values/app_icon_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"app_icon_background\">#262A30</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"selectedFileHighlight\">#2F0066FF</color>\n    <color name=\"previousFileHighlight\">#0A000000</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#1B2221</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">File Explorer</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/themes.xml",
    "content": "<resources>\n    <!-- Base application theme. -->\n    <style name=\"Theme.FileExplorer\" parent=\"Theme.Material3.DynamicColors.Light\">\n        <item name=\"android:windowLightStatusBar\">true</item>\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n    </style>\n\n    <style name=\"Theme.FileExplorer.Dark\" parent=\"Theme.Material3.DynamicColors.Dark\">\n        <item name=\"android:windowLightStatusBar\">false</item>\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n    </style>\n\n    <style name=\"Theme.FileExplorer.Light\" parent=\"Theme.Material3.DynamicColors.Light\">\n        <item name=\"android:windowLightStatusBar\">true</item>\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n    </style>\n\n    <style name=\"circleImageView\" parent=\"Theme.FileExplorer\">\n        <item name=\"cornerFamily\">rounded</item>\n        <item name=\"cornerSize\">20%</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-night/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"selectedFileHighlight\">#2F0066FF</color>\n    <color name=\"previousFileHighlight\">#0FFDFDFD</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-night/themes.xml",
    "content": "<resources>\n    <!-- Base application theme. -->\n    <style name=\"Theme.FileExplorer\" parent=\"Theme.Material3.DynamicColors.Dark\">\n        <item name=\"android:windowLightStatusBar\">false</item>\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/xml/provider_paths.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<paths>\n    <external-path\n        name=\"external_files\"\n        path=\".\" />\n    <cache-path\n        name=\"cache_files\"\n        path=\".\" />\n</paths>"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\nbuildscript {\n    ext.kotlin_version = '1.7.20-RC'\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:7.2.2'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/full_description.txt",
    "content": "<i>File Explorer</i> is a full-featured and lightweight file manager with Material 3 Dynamic colors.\n\n<br><b>Features:</b>\n\n- All basic file management functionality (e.g. copy, paste,.. etc) are supported.\n- Support for multiple tabs, and Tasks which make managing files much easier.\n- Powerful Code Editor (<a href='https://github.com/Rosemoe/sora-editor' target='_blank' rel='nofollow'>Sora Editor</a>).\n- Deep search that allows you to search in files contents.\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/short_description.txt",
    "content": "a full-featured file manager for android\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Jul 14 16:17:27 UTC 2022\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.5-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app\"s APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Automatically convert third-party libraries to use AndroidX\nandroid.enableJetifier=true"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\nAPP_HOME=$( cd \"${APP_HOME:-./}\" && pwd -P ) || exit\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=${0##*/}\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n# Collect all arguments for the java command;\n#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of\n#     shell script including quotes and variable substitutions, so put them in\n#     double quotes to make sure that they get re-expanded; and\n#   * put everything else in single quotes, so that it's not re-expanded.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "settings.gradle",
    "content": "dependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        jcenter() // Warning: this repository is going to shut down soon\n    }\n}\nrootProject.name = \"File Explorer\"\ninclude ':app'\n"
  }
]