check if a directory exists

Discussion in 'C++' started by calca77, Jan 9, 2004.

  1. calca77

    calca77 Guest

    Hi,
    Please, could anyone tell me how to check if a directory exists.
    Thank you everyone.

    D.
    calca77, Jan 9, 2004
    #1
    1. Advertising

  2. On Thu, 08 Jan 2004 23:19:13 -0800, calca77 wrote:

    > Hi,
    > Please, could anyone tell me how to check if a directory exists.
    > Thank you everyone.


    There is no way in standard C/C++. However, every platform that has
    directories has a way to check them. Ask in a group for your compiler
    and./or OS.

    HTH,
    M4
    Martijn Lievaart, Jan 9, 2004
    #2
    1. Advertising

  3. calca77 wrote:
    >
    > Hi,
    > Please, could anyone tell me how to check if a directory exists.
    > Thank you everyone.


    There is no way doing this with standard C++. You will need platform
    and/or compiler specific extensions. Thus you should consult a group
    which discusses your compiler and/or platform.

    --
    Karl Heinz Buchegger
    Karl Heinz Buchegger, Jan 9, 2004
    #3
  4. calca77 wrote:
    > Please, could anyone tell me how to check if a directory exists.
    > Thank you everyone.


    Hi!

    As others pointed out, directorys are OS specific.

    But boost provides a filesystem library the helps you at
    list with Windows and POSIX conforming OSes:

    http://boost.org/libs/filesystem/doc/index.htm

    hth

    Christoph
    Christoph Rabel, Jan 9, 2004
    #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. Pgar
    Replies:
    1
    Views:
    4,895
    =?Utf-8?B?U2FudGhhbmEgR29wYWxhbg==?=
    Nov 15, 2004
  2. Joris De Groote

    Check if a directory exists in a network drive?

    Joris De Groote, Apr 11, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,624
    bruce barker \(sqlwork.com\)
    Apr 11, 2006
  3. Jason Stacy
    Replies:
    2
    Views:
    4,679
    Roedy Green
    Apr 27, 2008
  4. Ulf Meinhardt
    Replies:
    8
    Views:
    6,141
  5. Florian Schaf

    Check if directory exists

    Florian Schaf, Dec 18, 2007, in forum: Ruby
    Replies:
    12
    Views:
    648
    Mike Bethany
    Sep 27, 2010
Loading...

Share This Page