Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to check if a file exists in a directory
Forum Updated to NodeBB v4.3 + New Features

how to check if a file exists in a directory

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    russjohn834
    wrote on last edited by
    #1

    Hi,
    How do I check whether a file exists in a given path or not in Qt?

    for ex, if my file location is:

    QString filePath = QCoreApplication::applicationDirPath()+"/data/filename.txt";
    
    jsulmJ 1 Reply Last reply
    0
    • R russjohn834

      Hi,
      How do I check whether a file exists in a given path or not in Qt?

      for ex, if my file location is:

      QString filePath = QCoreApplication::applicationDirPath()+"/data/filename.txt";
      
      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @russjohn834 Documentation says: https://doc.qt.io/qt-5/qfile.html#exists

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      6
      • R Offline
        R Offline
        russjohn834
        wrote on last edited by
        #3

        @jsulm thank you :)

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved