Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
'declarations:
|
||||
Public Declare Function GetFileAttributes Lib "kernel32" _
|
||||
Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long
|
||||
Public Const INVALID_FILE_ATTRIBUTES As Long = -1
|
||||
Public Const ERROR_SHARING_VIOLATION As Long = 32&
|
||||
|
||||
'implementation:
|
||||
Public Function FileExists(ByVal Filename As String) As Boolean
|
||||
Dim l As Long
|
||||
l = GetFileAttributes(Filename)
|
||||
If l <> INVALID_FILE_ATTRIBUTES Then
|
||||
FileExists = ((l And vbDirectory) = 0)
|
||||
ElseIf Err.LastDllError = ERROR_SHARING_VIOLATION Then
|
||||
FileExists = True
|
||||
End If
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue