In this section:
- Moving a file or a directory to another directory
Moving a file or a directory to another directory
- Select the file or directory in the Project tool window.
- Do one of the following:
The dialog that opens depends on the type of the selected symbol.
- In the To directory field, specify the folder to move the selected file or folder to. Choose an existing folder from the drop-down list or type the full path to the parent folder to be created.
- To have the references to the selected file or folder updated according to the refactoring result, select the Search for references check box.
- Select the symbol to move.
- Choose on the main menu or on the context menu of the selection or just press F6.
- In the dialog box that opens, specify the destination file.
In the example below, the function
changeSelectedPlaylists is moved from the
PlayerActions.js file to the
PlaylistsActions.js file. Note that an import statement for the types that
changeSelectedPlaylists requires is added to
PlaylistsActions.js. Also all the imports of
changeSelectedPlaylists in the other files are updated.