Results 1 to 4 of 4

Thread: Need help on mount nfs drive in Qt

  1. #1
    Join Date
    Sep 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Need help on mount nfs drive in Qt

    Can anyone show me how to mount a drive in Qt.

    in shell command in linux, I can use mount -t nfs drive:/home/test /mnt/test

    but how I can do it in Qt.

    Also I want to copy all files in my test dir to that /mnt/test.
    like in linux command I can use cp * /mnt/test

    Thanks,

    TN

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Need help on mount nfs drive in Qt

    You can use system() or QProcess() to call the above mentioned command to mount the drive. Then you can use QFile::copy() to copy those files.

  3. #3
    Join Date
    Sep 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Need help on mount nfs drive in Qt

    thank for your help, I just build a script and call Qprocess to do it.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Need help on mount nfs drive in Qt

    Note that if the script is short, using system() might be more straightforward as it allows you to make the call synchronous.

Similar Threads

  1. Replies: 10
    Last Post: 4th December 2006, 05:38
  2. problem of how to get drive
    By jyoti in forum General Programming
    Replies: 6
    Last Post: 30th November 2006, 14:18
  3. how to find the free space on a drive
    By klaus1111 in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2006, 10:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.