![]() |
Check whether file is in use
is there any way to check if a file is in use via inno setup?
|
You need to open the file with the intent to both read and writing to it, if this operation fails then it means the file is in use.
Code:
function IsFileInUse(Filename: String): Boolean; |
what happens if the file is so big? does it take too long?
|
Size is irrelevant
|
@Razor12911, Just curiosity...
Is it necessary to use "try" "finally"? It could not be used simply "do Free;" |
You can write "do Free", it's the same thing only for this case as there is no code within the try..finally statement that would cause an exception.
|
| All times are GMT -7. The time now is 22:04. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com