Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. which function can replace _tmkdir that known only in windows
Forum Updated to NodeBB v4.3 + New Features

which function can replace _tmkdir that known only in windows

Scheduled Pinned Locked Moved Solved Mobile and Embedded
tmkdir
10 Posts 4 Posters 693 Views 2 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
    Bracha
    wrote on last edited by
    #1

    Hi
    I am working on an embedded software that we have on windows and we move it to cross platform on Debian with Qt
    in the windows code is appear _tmkdir and i found that is a windows function, and I can not found function to replace it
    please let me know what I can do.
    Thanks

    jsulmJ JonBJ 2 Replies Last reply
    0
    • B Bracha

      @JonB
      Actually they are not considered, _tmkdir and mkdir.
      But I think in such a case its unnecessary, because the string will be a path and I guess there is no need for wide characters from Tchar.h
      (as you can see here:27bf8782-788b-4f2d-a231-1910e085f54e-image.png).

      What are you think?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #10

      @Bracha
      I have already answered twice. You can use either one, nothing more to say. If you want to get away from Windows/MSVC dependency, you should not be using the ones in the documentation you are consulting.

      1 Reply Last reply
      2
      • B Bracha

        Hi
        I am working on an embedded software that we have on windows and we move it to cross platform on Debian with Qt
        in the windows code is appear _tmkdir and i found that is a windows function, and I can not found function to replace it
        please let me know what I can do.
        Thanks

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Bracha https://doc.qt.io/qt-6/qdir.html#mkdir-1

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

        1 Reply Last reply
        4
        • B Bracha

          Hi
          I am working on an embedded software that we have on windows and we move it to cross platform on Debian with Qt
          in the windows code is appear _tmkdir and i found that is a windows function, and I can not found function to replace it
          please let me know what I can do.
          Thanks

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #3

          @Bracha
          _tmkdir() sounds like some kind of mkdir(), maybe with a wide-character parameter.

          There is a C runtime function mkdir() which is not Windows-specific. Or in Qt you have bool QDir::mkdir(const QString &dirName) const for this.

          B 1 Reply Last reply
          3
          • B Offline
            B Offline
            Bracha
            wrote on last edited by
            #4

            @jsulm u mean mkpath?
            from what i understand tmkdir are not normal mkdir and i try to figure out what the different

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #5

              Hi,

              From what I gathered, tmkdir is a wrapper around the CreateDirectory which requires the parent folders to exist. mkpath creates all the intermediate folders if they don't exists.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • JonBJ JonB

                @Bracha
                _tmkdir() sounds like some kind of mkdir(), maybe with a wide-character parameter.

                There is a C runtime function mkdir() which is not Windows-specific. Or in Qt you have bool QDir::mkdir(const QString &dirName) const for this.

                B Offline
                B Offline
                Bracha
                wrote on last edited by
                #6

                @JonB yes you are right, how can i adjust to tmkdir, i dont want to lose information
                i have this line:
                _tmkdir(L"\Nand Flash\failure");
                and i'm not sure why they choose to use tmkdir

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Bracha
                  wrote on last edited by
                  #7

                  @SGaist thank you
                  so from your side u think that tmkdir can replaced by mkpath?

                  JonBJ 1 Reply Last reply
                  0
                  • B Bracha

                    @SGaist thank you
                    so from your side u think that tmkdir can replaced by mkpath?

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #8

                    @Bracha
                    Why would you want to replace existing _tmkdir, which is working/intended, with a mkpath, which behaves differently?

                    I suggested to you earlier:

                    There is a C runtime function mkdir() which is not Windows-specific. Or in Qt you have bool QDir::mkdir(const QString &dirName) const for this.

                    Why not use one of these?

                    B 1 Reply Last reply
                    2
                    • JonBJ JonB

                      @Bracha
                      Why would you want to replace existing _tmkdir, which is working/intended, with a mkpath, which behaves differently?

                      I suggested to you earlier:

                      There is a C runtime function mkdir() which is not Windows-specific. Or in Qt you have bool QDir::mkdir(const QString &dirName) const for this.

                      Why not use one of these?

                      B Offline
                      B Offline
                      Bracha
                      wrote on last edited by Bracha
                      #9

                      @JonB
                      Actually they are not considered, _tmkdir and mkdir.
                      But I think in such a case its unnecessary, because the string will be a path and I guess there is no need for wide characters from Tchar.h
                      (as you can see here:27bf8782-788b-4f2d-a231-1910e085f54e-image.png).

                      What are you think?

                      JonBJ 1 Reply Last reply
                      0
                      • B Bracha

                        @JonB
                        Actually they are not considered, _tmkdir and mkdir.
                        But I think in such a case its unnecessary, because the string will be a path and I guess there is no need for wide characters from Tchar.h
                        (as you can see here:27bf8782-788b-4f2d-a231-1910e085f54e-image.png).

                        What are you think?

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #10

                        @Bracha
                        I have already answered twice. You can use either one, nothing more to say. If you want to get away from Windows/MSVC dependency, you should not be using the ones in the documentation you are consulting.

                        1 Reply Last reply
                        2

                        • Login

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