473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

check if a subdirectory exists

Hello all

How can I check if a subdirectory exists?

Regards,

Diego
Nov 14 '05 #1
19 2354
Diego Andres Alvarez Marin <di****************@lycos.co.uk> scribbled the following:
Hello all How can I check if a subdirectory exists?


In ISO standard C, you can't. You have to ask in a newsgroup dedicated
to your own operating system.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
Nov 14 '05 #2
Op Tue, 04 May 2004 02:17:25 -0700, schreef Diego Andres Alvarez Marin:
Hello all

How can I check if a subdirectory exists?


By posting to comp.os.linux.development.apps :)

mvg Thomas

Nov 14 '05 #3
Thomas Deschepper wrote:
Op Tue, 04 May 2004 02:17:25 -0700, schreef Diego Andres Alvarez Marin:

Hello all

How can I check if a subdirectory exists?

By posting to comp.os.linux.development.apps :)

mvg Thomas


That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Nov 14 '05 #4

"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:Ur***************@newssvr16.news.prodigy.com. ..
That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?
--
Thomas Matthews

Search your C library headers for functions such as opendir, readir, etc.
These are POSIX functions and should suit your needs. Are you using
VxWorks? Look in the Reference Manual for the "dirLib."

DrX
Nov 14 '05 #5
Xenos <do**********@spamhate.com> scribbled the following:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:Ur***************@newssvr16.news.prodigy.com. ..
That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?
Search your C library headers for functions such as opendir, readir, etc.
These are POSIX functions and should suit your needs. Are you using
VxWorks? Look in the Reference Manual for the "dirLib."


Thomas, you need to be less subtle. Xenos missed your point.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Bad things only happen to scoundrels."
- Moominmamma
Nov 14 '05 #6

"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:c7**********@oravannahka.helsinki.fi...
Thomas, you need to be less subtle. Xenos missed your point.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Bad things only happen to scoundrels."
- Moominmamma


No, I know he was hinting it was OT. Didn't care; answered the question
anyways.


Nov 14 '05 #7
Xenos wrote:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:Ur***************@newssvr16.news.prodigy.com. ..
That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?
--
Thomas Matthews


Search your C library headers for functions such as opendir, readir, etc.
These are POSIX functions and should suit your needs. Are you using
VxWorks? Look in the Reference Manual for the "dirLib."

DrX


Sorry, but my embedded system is not running *nix.
Another hint: It doesn't have a file system.

So, how does opendir work on it?
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Nov 14 '05 #8
Joona I Palaste wrote:
Xenos <do**********@spamhate.com> scribbled the following:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:Ur***************@newssvr16.news.prodigy.com. ..
That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?


Search your C library headers for functions such as opendir, readir, etc.
These are POSIX functions and should suit your needs. Are you using
VxWorks? Look in the Reference Manual for the "dirLib."

Thomas, you need to be less subtle. Xenos missed your point.


Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Nov 14 '05 #9

"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:lz***************@newssvr32.news.prodigy.com. ..

Sorry, but my embedded system is not running *nix.
Another hint: It doesn't have a file system.

So, how does opendir work on it?
--
Thomas Matthews

I never said anything about any flavor of Unix. If it doesn't have a
filesystem, why do you care?
Nov 14 '05 #10

"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:gB***************@newssvr32.news.prodigy.com. ..
Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?

You flip your "stop being a c.l.c asshole" and just answer the poor guys
question.
Nov 14 '05 #11
Xenos <do**********@spamhate.com> scribbled the following:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:gB***************@newssvr32.news.prodigy.com. ..
Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?

You flip your "stop being a c.l.c asshole" and just answer the poor guys
question.


You stop insulting people and have another look at this thread, to see
that I answered his question long before you got into your little feud.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Make money fast! Don't feed it!"
- Anon
Nov 14 '05 #12

"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:c7**********@oravannahka.helsinki.fi...
You stop insulting people and have another look at this thread, to see
that I answered his question long before you got into your little feud.


I never started any "little feud." I was just trying to answer to OP. I
didn't have that particular message (my server seems to drop a lot) and used
to one furthest up the thread. It was you who had to throw in a pompous
comment. I swear, posting here is like poking a bear with a stick.
Nov 14 '05 #13
Xenos <do**********@spamhate.com> scribbled the following:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:c7**********@oravannahka.helsinki.fi...
You stop insulting people and have another look at this thread, to see
that I answered his question long before you got into your little feud.
I never started any "little feud." I was just trying to answer to OP. I
didn't have that particular message (my server seems to drop a lot) and used
to one furthest up the thread. It was you who had to throw in a pompous
comment. I swear, posting here is like poking a bear with a stick.


Pardon me, which pompous comment? The one about ISO standard C not
supporting subdirectories (which is true), or about you missing
Thomas's point? The fact that you missed Thomas's point was Thomas's
fault, not yours. He should have told right out that his embedded
platform doesn't have a file system at all.
If people think that ISO standard C does not support subdirectories
is pompous, that's not going to magically make ISO standard C support
them. We can't change the language, we only discuss it. If you still
wish to make it support subdirectories, feel free to go over to
comp.std.c to discuss it with members of the standards committee.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"War! Huh! Good God, y'all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
Nov 14 '05 #14
"Xenos" <do**********@spamhate.com> writes:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:gB***************@newssvr32.news.prodigy.com. ..
Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?

You flip your "stop being a c.l.c asshole" and just answer the poor guys
question.


No, you politely tell the poor guy that comp.lang.c is not the place
to ask about directories (which are not supported by the C standard),
and give him a hint about where to go to find the people who actually
can answer his question.

I've lost count of the number of times people have tried to be helpful
by answering off-topic questions in comp.lang.c, and ended up posting
system-specific misinformation. Misinformation is inevitable, but if
it's posted to an appropriate newsgroup it's more likely to be
corrected quickly.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
Nov 14 '05 #15
On Tue, 4 May 2004 14:59:34 -0400, in comp.lang.c , "Xenos"
<do**********@spamhate.com> wrote:

"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:lz***************@newssvr32.news.prodigy.com. ..

Sorry, but my embedded system is not running *nix.
Another hint: It doesn't have a file system.

So, how does opendir work on it?


I never said anything about any flavor of Unix. If it doesn't have a
filesystem, why do you care?


You may take the view that /you/ can answer an OT question, so you should.

Wrong.

If you answer an offtopic question here, nobody knows if you're right or
wrong. The massive error in your answer will go unspotted. The OP will have
been given a misleading or even dangerous solution, which will result in a
train crashing, him being fired by his company. his aged father starving
and his daughters turing to prostitution. He will rightly blame you, and
one evening you'll open your front door to discover that you your memory
space is flat, due to that anvil he just dropped on it....

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 14 '05 #16
Xenos wrote:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:gB***************@newssvr32.news.prodigy.com. ..
Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?


You flip your "stop being a c.l.c asshole" and just answer the poor guys
question.

Why don't you flip your "stop being an asshole (unqualified" switch?
What's your next off-topic question going to be? Should we answer you
questions about whether viagra will give you pimples?

Nov 14 '05 #17
Xenos wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
You stop insulting people and have another look at this thread,
to see that I answered his question long before you got into
your little feud.


I never started any "little feud." I was just trying to answer
to OP. I didn't have that particular message (my server seems to
drop a lot) and used to one furthest up the thread. It was you
who had to throw in a pompous comment. I swear, posting here is
like poking a bear with a stick.


The OP has never reappeared. He probably took the excellent
original advice to ask in a group dealing with his system. It is
never wise, whether or not you believe you know the answer, to
reply to an off-topic query. Your answer will not normally be
vetted by others experienced in the subject, and thus errors will
not be caught.

If you know of a suitable group, I consider the best alternative
to be to quote the entire question, cross post it to that group,
and set follow-ups accordingly. Add a two liner saying what you
have done. Having done all that you can actually propose a
solution that may get properly vetted.

--
fix (vb.): 1. to paper over, obscure, hide from public view; 2.
to work around, in a way that produces unintended consequences
that are worse than the original problem. Usage: "Windows ME
fixes many of the shortcomings of Windows 98 SE". - Hutchison
Nov 14 '05 #18
On Tue, 04 May 2004 18:49:48 GMT, Thomas Matthews
<Th****************************@sbcglobal.net> wrote in comp.lang.c:
Joona I Palaste wrote:
Xenos <do**********@spamhate.com> scribbled the following:
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:Ur***************@newssvr16.news.prodigy.com. ..

That won't help me with my embbeded ARM processor
system that I am working on. Do you have any
suggestions?


Search your C library headers for functions such as opendir, readir, etc.
These are POSIX functions and should suit your needs. Are you using
VxWorks? Look in the Reference Manual for the "dirLib."

Thomas, you need to be less subtle. Xenos missed your point.


Sorry, perhaps this will do:
I am running a simple operating loop on an embedded system that
does not have a harddrive. It has an ARM processor, a UART,
and SRAM. How do I use anybody's techniques for finding
subdirectories on my platform, especially when it doesn't
support any kind of filesystem?


Doesn't sound like much.

Our new ARM embedded controller has 6 UARTs, 3 CAN channels, USB 2.0,
SRAM, and SDRAM.

And it does have a file system, in FLASH, but it is completely of our
own devising. No <stdio.h> support, other than sprintf() and
snprintf(), is used.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #19
On Tue, 04 May 2004 21:24:58 +0100, Mark McIntyre wrote:
and one evening you'll open your front door to discover that you your
memory space is flat, due to that anvil he just dropped on it....


Wouldn't that segment his memory into teeny tiny little pages?

August "Oh, and the segment tables are all munged" Derleth

--
yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
To email me, rot13 and convert spelled-out numbers to numeric form.
"Makes hackers smile" makes hackers smile.

Nov 14 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jonathan | last post by:
I am looking for a simple way to check if a database table exists. I keep getting advice to use "Try.. Catch" and other error handling methods, but I obviously don't want to have to display an...
4
by: Bill | last post by:
Will IIS6.0 recognize a global.asa file located in a subdirectory on the webserver? I'd like a file that will execute whenever a file in the subdirectory is browsed - or, at least it is...
0
by: VB Programmer | last post by:
My web root is in C:\Inetpub\wwwroot\MyDir I have a graphics directory in C:\Inetpub\wwwroot\MyDir\MyGraphics I want do do a 'Dir' to see 1st if the directory exists, then 2nd to see if a file...
2
by: keith | last post by:
I created a subdirectory in a project and added an image to the subdirectory from the project and set its property Build Action=Embedded Resource. Then instanciate a image by Image img=new...
16
by: Brian Tkatch | last post by:
Is there a way to check the order in which SET INTEGRITY needs to be applied? This would be for a script with a dynamic list of TABLEs. B.
0
by: =?Utf-8?B?Qm9ubmll?= | last post by:
I have a basic ASP / Index Server search page. I have a web site contained in a subdirectory in the root of a main web site. What I’m trying to do is force the search page in the subdirectory,...
0
by: =?Utf-8?B?bW9iaWxlbW9iaWxl?= | last post by:
Hi all. I have experience with C#/VB.NET and ASP Classic, but am very new to ASP.NET. I'm using ASP.NET 2.0 and am modifying a site. I copied the site files to a subdirectory to test and...
4
by: pwu | last post by:
Hi, I am doing an automated scan of a large number of UNIX machines which can be Solaris, AIX or HPUX. I want to find out for a machine via a script if: 1) DB2 is installed? 2) If installed...
2
by: qwedster | last post by:
Folk! How to programattically check if null value exists in database table (using stored procedure)? I know it's possble in the Query Analyzer (see last SQL query batch statements)? But how...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.