Creating, Renaming, and Deleting Files
The Project tool supports creating, renaming, and deleting files and directories on disk. In Wing Pro, changes are tracked also into any active version control system's repository.
Creating Files, Directories, and Packages
The right-click context menu in the Project tool contains items for creating new files, directories, and Python packages:
- Create New File prompts for a new file's name and opens the file in the editor. The file is not actually created on disk until it is saved from the editor. If a version control system is active, the file will automatically be added to the repository.
- Create New Directory prompts for a new directory's name and creates the directory on disk. The directory will automatically be added to the active version control repository, if that version control system tracks empty directories.
- Create New Package prompts for a new directory's name, creates the directory on disk, creates a file __init__.py inside that directory, and opens it in the editor. If a version control system is active, the file and directory will automatically be added to the repository.
Renaming Files and Directories
Files and Directories can be renamed by clicking on an already-selected item in the Project tool and editing the name in place. When Enter is pressed to complete the edit, the item will be renamed on disk. In Wing Pro, if there is an active version control system then the rename will also be tracked in the repository.
Items can also be renamed by right-clicking on them and selecting Rename.
Deleting Files and Directories
Files and Directories can be deleted by right-clicking on an item in the Project tool and selecting Move to Trash (or Delete on Windows). The item will be moved to the trash or recycling bin provided by the operating system. In Wing Pro, if there is an active version control system then the removal will also be tracked in the repository.