×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Best way to delete large amout of file on Symbian

    Hi all,

    I search a way to delete a large amout of small png file(256x256), like 2000 or more files. In desktop computer, no problem but I deal with a Nokia 5800 and I would like to be as fast as possible.

    does someone know the best way to do that?

    thank you.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Best way to delete large amout of file on Symbian

    Are you asking about Qt means?

  3. #3
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    yes, with Qt.

    I try this code :
    Code:
    QStringList filter;
        filter <<"*.png";
    
        QDir dir = QDir(DIR);
    
        QString path = DIR;
        path+="%1";
        dir.setNameFilters(filter);
        QStringList dirs = dir.entryList(filter);
    
        for(int i=0;i<dirs.count();i++)
        {
            qDebug()<<dirs.at(i);
            if(QFile::remove(path.arg(dirs.at(i))))
                emit DeleteProgress(1);
        }
        emit DeleteFinished();
        return true;
    but it doesn't work, it block on the dir.entryList(filter);

    Maybe a better way exist to do the job ?

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Best way to delete large amout of file on Symbian

    Does the app have the necessary capabilities? In particular, ReadUserData and WriteUserData?

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    I put it in the .pro file : "TARGET.CAPABILITY += ReadUserData" but not "WriteUserData".
    I will put that in my .pro file.

    I will post the result.

    thanks for reply
    Last edited by Fillinger; 2010-07-29 at 12:43.

  6. #6
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    I wake up this thread because after some test, the problem stay.

    It stop on the line : QStringList dirs = dir.entryList(filter);. A also try to remove the filter but that's not work.

    thanks for reply.

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Best way to delete large amout of file on Symbian

    What do you mean by "stop"? What happens -- hang, panic, app just goes "poof"?

  8. #8
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    The app doesn't react after that line, impossible to interact. I try debug and I wait few minute, but the app hang, and I don't receive any error.

  9. #9
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Best way to delete large amout of file on Symbian

    What is DIR?

  10. #10
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    Quote Originally Posted by danhicksbyron View Post
    What is DIR?

    DIR is a define of the path of the directory
    Code:
    #ifndef DIR
    #define DIR "e:\\Cache\\"
    #endif

  11. #11
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Best way to delete large amout of file on Symbian

    Qt uses "/" as a universal directory separator in the same way that "/" is used as a path separator in URLs. If you always use "/" as a directory separator, Qt will translate your paths to conform to the underlying operating system.
    http://doc.qt.nokia.com/4.6-snapshot/qdir.html

  12. #12
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    I try with "e:/Cache/" , "e:/Cache", "e://Cache" , "e://Cache//" and nothing work, always hang on the command : dir.entryList(filter);

    Is it possible that the number of file is too big ? If it is do you have an idea to delete all the files? without remove the directory.

  13. #13
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Best way to delete large amout of file on Symbian

    Are you sure that e:/Cache even exists? Remember, the view you get from Ovi isn't a true view of the file system.

  14. #14
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    Yes the directory exist, I check at the begin of the execution and if it doesn't exist I create it.

  15. #15
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: Best way to delete large amout of file on Symbian

    Nobody have an idea of what cause this? I need that method to work, because I need it for others works, like check if some file are in the SD Card.
    Because it's slow to check if the file exist on the SD (300ms +/-) , I think to load all file name (QDir::entryList) and check if the list contain my file.

    But QDir::entryList not work .

    I need someone to help me .

Similar Threads

  1. File too large to be saved
    By mindus in forum Mobile Java General
    Replies: 2
    Last Post: 2010-02-05, 13:04
  2. How to delete a file in symbian?
    By sundy10 in forum Symbian
    Replies: 5
    Last Post: 2009-11-06, 16:04
  3. Mimimum amout in OBEX PUT operation?
    By bwalt in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-08-06, 08:05
  4. File Size too large
    By titch_stewart in forum Mobile Java General
    Replies: 3
    Last Post: 2003-04-28, 20:43
  5. File too large
    By ori_lavie in forum Mobile Java General
    Replies: 1
    Last Post: 2002-08-21, 11:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×