8f8fcb091f
- resa pubblica funzione FileInUse.
31 lines
895 B
VB.net
31 lines
895 B
VB.net
'----------------------------------------------------------------------------
|
|
' EgalTech 2015-2015
|
|
'----------------------------------------------------------------------------
|
|
' File : Utilities.vb Data : 18.01.15 Versione : 1.6a3
|
|
' Contenuto : Funzioni di utilità.
|
|
'
|
|
'
|
|
'
|
|
' Modifiche : 18.01.15 DS Creazione modulo.
|
|
'
|
|
'
|
|
'----------------------------------------------------------------------------
|
|
|
|
Public Module Utilities
|
|
|
|
' Verifica se il file è in uso
|
|
Public Function FileInUse(sFile As String) As Boolean
|
|
If System.IO.File.Exists(sFile) Then
|
|
Try
|
|
Dim F As Short = FreeFile()
|
|
FileOpen(F, sFile, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite)
|
|
FileClose(F)
|
|
Catch
|
|
Return True
|
|
End Try
|
|
End If
|
|
Return False
|
|
End Function
|
|
|
|
End Module
|