Notice: Undefined offset: 2 in /home2/icentarb/public_html/icentar/classes/class.permissions.php on line 735
Function FileExists(Putanja As String, Optional ImeFajla As String) As Boolean
On Error GoTo Error_Handler
Dim Fajl As String, PathStr As String
If Right(Putanja, 1) = "/" Or Right(Putanja, 1) = "\" Then
PathStr = Putanja & ImeFajla
Else
PathStr = Putanja & "/" & ImeFajla
End If
If Dir(PathStr) <> "" Then
FileExists = True
Exit Function
End If
Error_Handler_Exit:
On Error Resume Next
FileExists = False
Exit Function
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: DirFajl" & vbCrLf & _