Create Empty Files
Generally, all the files that you create when developing applications are template-based. However, sometimes you may want to create empty files.
- Do one of the following:
In the Project tool window Alt+1, select the directory in which you want to create a new file, and then choose on the main menu.
Right-click the corresponding directory and select New from the context menu.
In the New File dialog, in the field under Enter a new file name, type the filename and extension.
You can specify the whole directory structure prepending the new filename. If the nested directories do not yet exist, they will be created:
If the extension you have specified is not associated with any of the file types recognized by CLion, the Register New File Type Association dialog is displayed.
In this dialog, you can associate the extension with one of the recognized file types. To do that, select the file type under Open matching files in CLion and click OK. As a result, the extension is associated with the specified file type.
- Click OK.
If the names of non-existent sub-directories were specified before the new filename, the whole structure will be created under the target directory.