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. Return of uint QDir::count () const
Forum Updated to NodeBB v4.3 + New Features

Return of uint QDir::count () const

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • B Offline
    B Offline
    BibekKumar
    wrote on last edited by
    #1

    Suppose i have one folder and inside that another two files are there ..
    But when i am using uint QDir::count () const, it gives me 4 instead of 2 . the extra 2 is for "." and ".." .i dont understand what is this "." and ".."

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Did you see the "QDir explanation?":http://qt-project.org/doc/qt-4.8/QDir.html#navigation-and-directory-operations
      On the command prompt "." represents the current (working) directory and ".." the parent directory.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • V Offline
        V Offline
        veeraps
        wrote on last edited by
        #3

        Guess '.' & '..' way go back to MSDOS days - hope this link might be useful "MSDOS":http://teckies.com/tutor/dos/dos-ch3.html

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BibekKumar
          wrote on last edited by
          #4

          Suppose the directory structure is as follows a->b,c and A->a then in this case if i apply the above function , then "." represents a since it holds b and c , whereas ".." represents A which holds a . Am i right ????

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            [quote author="BibekKumar" date="1340007257"]Suppose the directory structure is as follows a->b,c and A->a then in this case if i apply the above function , then "." represents a since it holds b and c , whereas ".." represents A which holds a . Am i right ????[/quote]

            Yes, those are simply some representations. There are some more explanations on how using and handling of those special cases in Qt docs e.g. "relativeFilePath":http://qt-project.org/doc/qt-4.8/qdir.html#relativeFilePath

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0

            • Login

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