Web Analytics Made Easy -
StatCounter C# Physical File Detection - CodingForum

Announcement

Collapse
No announcement yet.

C# Physical File Detection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C# Physical File Detection

    Is there a way to detect if a physical file exists using ASP.NET C#?

    I have a web directory holding images that I want to display on a web page. I have a flag in the database to toggle if the file exists or not, but as a safety precaution, is there a way to detect if the physical file exists?

    Thanks,
    Chris

  • #2
    Code:
    if (File.Exists(path)) {
     //im alive , alive , alive muahahaha
    }
    File.Exists method
    does this sig match?

    Comment

    Working...
    X