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. Load multiple files from directory in memory
Forum Updated to NodeBB v4.3 + New Features

Load multiple files from directory in memory

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.3k 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.
  • V Offline
    V Offline
    victoryfox
    wrote on last edited by
    #1

    Using QFileDialog how can i

    a) open multiple files from a given directory on the local hard disk?

    scenario:

    • open dir
    • in that dir search for the following files: Tables.sql , Indexes.sql , Views.sql,...etc. Anyway, these are hardcoded.
    • if they not found -> error msg, else:
    • load every file in memory.

    b) save every file to memory for later processing. I thought of QByteArray?

    INFO:

    While i parse for example: Tables.sql, i will need for some tables also their indexes,..etc. SO i thought the best way would be to load files to ByteArrays.

    Thanks in advanced
    fox

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheDestroyer
      wrote on last edited by
      #2

      Just use a QFile or fstream, and loop over all the files in the directory, and open them 1 by 1...! then do everything you wanna do with them!

      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