Advertisement
2002ASP Files/ File Controls/ Input/ Output #69

File/Directory/Drive Exists (Updated)

This code returns a true/false if a specified drive/directory/pathname exists. This is a small, fast routine.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Function File_Exists(ByVal PathName As String, Optional Directory As Boolean) As Boolean
 'Returns True if the passed pathname exist
 'Otherwise returns False
 If PathName <> "" Then
 
 If IsMissing(Directory) Or Directory = False Then
 
  File_Exists = (Dir$(PathName) <> "")
  
 Else
 
  File_Exists = (Dir$(PathName, vbDirectory) <> "")
  
 End If
 
 End If
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine