a function to get the full path names of a list of files

Discussion in 'C++' started by redstone-cold@163.com, Jan 31, 2013.

  1. Guest

    First ,I am not a C++ programmer but a python programmer .I am only a little familiar with C++ ,so I cannot implement this function myself ,my use of this function is to wrap it into Python to improve my program’s working efficiency .

    I have already know a list of files in a specified directory or its subdirectories , I need a function to get the full path names of this list of files ,now I am going to give out the prototype of this function , I wonder if you can help me to implement this function .

    function name : get FullPathNames
    parameter : the path to the parent directory that all of that list of filesare contained in, a list of file names the I need to get their full path names back

    return value : a list of full path names

    thanks in advance !
     
    , Jan 31, 2013
    #1
    1. Advertising

  2. Guest

    在 2013å¹´1月31日星期四UTC+8上åˆ10æ—¶07分36秒,写é“:
    > First ,I am not a C++ programmer but a python programmer .I am only a little familiar with C++ ,so I cannot implement this function myself ,my use of this function is to wrap it into Python to improve my program’s working efficiency . I have already know a list of files in a specified directory or its subdirectories , I need a function to get the full path names of this list of files ,now I am going to give out the prototype of this function , I wonder if you can help me to implement this function . function name : get FullPathNames parameter : the path to the parent directory that all of that list of files are contained in, a list of file names the I need to get their full path names back return value : a list of full path names thanks in advance !


    I use it on WinXP
     
    , Jan 31, 2013
    #2
    1. Advertising

  3. writes:

    > First ,I am not a C++ programmer but a python programmer .I am only a
    > little familiar with C++ ,so I cannot implement this function myself
    > ,my use of this function is to wrap it into Python to improve my
    > program’s working efficiency .


    Luca gave you an answer, but I really doubt you'll gain anything by
    rewriting your python code (presumably something like
    "[os.path.join(parent,path) for path in paths]") in C++. Except of
    course if your only goal is to learn something new.

    -- Alain.
     
    Alain Ketterlin, Jan 31, 2013
    #3
  4. Öö Tiib Guest

    On Thursday, 31 January 2013 04:07:36 UTC+2, wrote:
    > I have already know a list of files in a specified directory or
    > its subdirectories , I need a function to get the full path names
    > of this list of files ,now I am going to give out the prototype of
    > this function , I wonder if you can help me to implement this function.


    If it is some homework then ... that was meant for you to learn
    something, why you ask us to spoil the purpose for you?

    If you need it as Python programmer then you should not implement it
    in C++ to use it in Python. Additional layer of C++ between your
    Python code and operating system wins you nothing. Same written in
    Python works as quickly.

    All the functionality you asked is already present in file system
    kernel of operating system. I am not sure if it is implemented in C,
    C++, assembler or in mix of those but majority of running time of it
    will go to I/O operations of hard drive driver.
     
    Öö Tiib, Feb 1, 2013
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PHaroZ
    Replies:
    5
    Views:
    95,659
    akash02sap
    Aug 17, 2012
  2. Carl
    Replies:
    0
    Views:
    541
  3. Jiri Brada

    Recent file list - FULL PATH?

    Jiri Brada, May 18, 2004, in forum: C++
    Replies:
    2
    Views:
    514
    Sharad Kala
    May 18, 2004
  4. dude
    Replies:
    5
    Views:
    1,788
    Jussi Piitulainen
    Mar 17, 2011
  5. Sfdesigner Sfdesigner
    Replies:
    5
    Views:
    187
    Chris Shea
    Aug 13, 2007
Loading...

Share This Page