Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor saniat.rasel's Avatar
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146
    Hi,
    Is there any api to get a folder size ?
    I get file size from:http://wiki.forum.nokia.com/index.ph..._get_File_Size
    but no folder size information.
    Thanks in advance.
    Saniat

  2. #2
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    Hi,

    I am not sure but can you check with CDir?

  3. #3
    Super Contributor paipeng's Avatar
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721
    hello,


    one possible is to count all files' size together under this folder.



    pai
    Symbian && Android && iPhoneOS

  4. #4
    Regular Contributor saniat.rasel's Avatar
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146
    To count all file size will takes too much time cause the targeting folder is tree structured.too many folders and files are there.recursively get all files and count their size will takes a little bit times.

    In CDir, i still dont find any api for get folder size.

    Thanks in advance.
    Saniat

  5. #5
    Nokia Developer Champion chenziteng's Avatar
    Join Date
    May 2004
    Posts
    2,265
    Hi,

    You have to scan (by CDirScan and CDir, for example) the folder hiararchy and get each individual file size then sum them up.

    "Using CDirScan"
    http://library.forum.nokia.com/index...ass.guide.html

    You are right the calculation can be time-consuming so you should split the task with Active Object

    "Splitting long running tasks with active objects"
    http://wiki.forum.nokia.com/index.ph...active_objects

    and for better user experience you can also show a wait dialog during the scan.

    "How to use the CAknWaitDialog"
    http://wiki.forum.nokia.com/index.ph...CAknWaitDialog

    "Progress and wait notes"
    http://wiki.forum.nokia.com/index.ph...and_wait_notes

    Regards

    Ziteng Chen

  6. #6
    Regular Contributor saniat.rasel's Avatar
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146
    Thanks for help.

    I will use wait dialog.
    Saniat

  7. #7
    Registered User Maksim85's Avatar
    Join Date
    Dec 2008
    Posts
    30
    Hi all!
    Please help me, how to estimate time of calculating size?

    Thanks.

  8. #8
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    If you mean that you want to display a progress bar, you may rather want to use the number of files, than some estimation.

  9. #9
    Registered User Maksim85's Avatar
    Join Date
    Dec 2008
    Posts
    30
    Thank you wizard_hu_ it is idea
    How get number of files?

  10. #10
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    CDir::Count?

Similar Threads

  1. how to get the size of Image folder Size
    By diptendulkar in forum Symbian C++
    Replies: 1
    Last Post: 2009-02-11, 07:09
  2. [j2me] Delete Folder
    By altropinto in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-30, 19:19
  3. Replies: 7
    Last Post: 2007-09-05, 10:38
  4. Carbide 1.2.2 BUG - Add new source folder
    By zdenko in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-09-04, 09:44
  5. A Different Jar Size Limit Problem
    By cicdem in forum Mobile Java General
    Replies: 0
    Last Post: 2004-06-17, 15:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved