File creation:
Copy the codeThe code is as follows:
( + "\\");//Create this file
(filePath) //Return the file name with extension
(filePath) //Returns the file name without extension
(filePath) //Return to the directory where the file is located
(filePath) //Return the file name with extension
(filePath) //Returns the file name without extension
(filePath) //Return to the directory where the file is located
The file exists:
Copy the codeThe code is as follows:
( + "\\")
info = new ( + "\\");
(());
info = new ( + "\\");
(());
Isn't it very simple, but sometimes we may feel unfamiliar with functions like GetFileNameWithoutExtension or GetDirectoryName. In the past, we always foolishly wrote function implementations by ourselves, but it turned out that we could only do it with just one line of code~