CLion 2021.3 Help

Create empty files

Besides template-based files, you can also create empty files without any pre-filled content.

Create an empty file

  1. In the Project tool window, right-click the directory within which you want to add a new empty file. Select New | File:

    Creating a new empty file
  2. In the New File dialog, specify the file name. You can precede it with the required directory structure - if some of the nested directories do not exist, they will be created:

    Creating a new file with nested directories
  3. If you have not specified the file extension, or if the extension is not associated with any of the recognized file types, CLion shows the Register New File Type Association dialog:

    Register a file type

    To associate the extension with one of the recognized file types, select it under Open matching files in CLion.

    If there are no appropriate file types for the new extension, you may want to create a new file type and associate the extension with it. For more information, see Associate a filename pattern with specific file type.

  4. The specified structure will be created under the chosen directory:

    New empty file inside nested directories
Last modified: 08 March 2021