// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-file-system-view.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-ui

    \target {File System}
    \title View file system

    Use the \uicontrol {File System} view to see all the files in the current directory.

    \note Usually, \l{Navigate with locator}{searching with the locator}
    is the fastest way to find a particular project, file, class, or function,
    or almost anything else in your project. Use the \e {file system (f)} filter
    to open files from anywhere in the file system.

    \image {qtcreator-filesystem-view.webp} {File System view in the sidebar}

    To go to the root directory of the file system, select \uicontrol Computer
    in the menu (1). Select \uicontrol Home to go to the user's home
    directory. Further, you can select a project to go to an open project
    or \uicontrol Projects to go to the directory specified in
    \uicontrol {Projects directory} in \preferences >
    \uicontrol {Build & Run} > \uicontrol General.

    To view files on a connected device, such as a Remote Linux, Android,
    or iOS device, select the device in the menu.

    The file that is currently active in the editor determines which folder
    to display in the \uicontrol {File System} view:

    \list
        \li \uicontrol Projects if the file is located in a subdirectory of the
            \uicontrol {Projects directory}
        \li \uicontrol Home if the file is located in the user's home directory
        \li \uicontrol Computer in all other cases
    \endlist

    To stop the synchronization between the editor and the
    \uicontrol {File System} view, clear
    \inlineimage {icons/linkicon.png} {Synchronize Root Directory with Editor}
    (\uicontrol {Synchronize Root Directory with Editor}).

    The view displays the path to the active file as bread crumbs. You can move
    to any directory along the path by clicking it.

    \section1 File System context menu

    Use the context menu functions to:

    \list
        \li Open files with the default editor or some other editor.
        \li Open a project located in the selected directory.
        \li Show the file or directory in the file explorer.
        \li Open a terminal window in the selected directory or in the directory
            that has the file. To specify the terminal to use on Linux and
            \macos, select \preferences > \uicontrol Environment >
            \uicontrol System.
            To use an \l{Open a terminal} {internal terminal}, select \preferences >
            \uicontrol Terminal > \uicontrol {Use internal terminal}.
        \li Search in the selected directory.
        \li View file properties, such as name, path, MIME type, default editor,
            line endings, indentation, owner, size, last read and modified
            dates, version control state, and permissions.
        \li Create new files. For more information, see \l {Adding files}.
        \li Rename existing files. To move the file to another directory, enter
            the relative or absolute path to its new location in addition to the
            new filename.
        \li Remove existing files.
        \li Create new folders.
        \li Compare the selected file with the currently open file in the diff
            editor. For more information, see \l{Compare files}.
        \li View the versioning history of a project directory. For more
            information, see \l {git log}.
        \li Display the contents of a particular directory in the view.
        \li Collapse all open folders.
    \endlist

    \section1 File System view toolbar

    The toolbar in the \uicontrol {File System} view has additional
    options.

    To manage view contents, select \inlineimage {icons/filtericon.png} {Options}
    (\uicontrol Options):

    \list
        \li To hide the bread crumbs, clear \uicontrol {Show Bread Crumbs}.
        \li By default, the view separates folders from files and lists them
            first. To list all items in alphabetic order, clear
            \uicontrol {Show Folders on Top}.
        \li To also show hidden files, select \uicontrol {Show Hidden Files}.
    \endlist

    To stop the synchronization with the file currently open in the
    editor, clear \inlineimage {icons/linkicon.png} {Synchronize with Editor}
    (\uicontrol {Synchronize with Editor}).

    \sa {View CMake project contents}, {Projects}
*/
