Folder listing

How can I list the contents of a folder, remaining indipendent from the OS I’m running on? (obviously I’m not
interested in OS-dipendent things like permissions, owner/group, hidden/system/archive flags etc., i just need
file names and sizes and subfolders).

There is no totally portable way of doing this, but the POSIX API
(opendir(), readdir() etc) seems to be available on practically all
Unix-like platforms, as well as some others. (I know it works on Win32
with MinGW32, but I’m not sure if that’s MinGW32 wrapping the native
Win32 API or not.)

Other than that, there are some libraries that do this. (The authors of
these will probably post URLs. :slight_smile:

I have one as well (in Kobo Deluxe), but I’ve hardly been using those
features so far, so I’m not even sure they work well on Win32, let alone
any other OS. (I’m working exclusively on Linux, only crosscompiling
Win32 binaries occasionally.)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 19 April 2002 19:20, CRV?ADER/KY wrote:

How can I list the contents of a folder, remaining indipendent from the
OS I’m running on? (obviously I’m not interested in OS-dipendent things
like permissions, owner/group, hidden/system/archive flags etc., i just
need file names and sizes and subfolders).

I’m not the author so I’m not going to post a URL, but
you can use physfs :slight_smile:

— David Olofson <david.olofson at reologica.se> wrote:> On Friday 19 April 2002 19:20, CRV?ADER/KY wrote:

How can I list the contents of a folder, remaining
indipendent from the
OS I’m running on? (obviously I’m not interested
in OS-dipendent things
like permissions, owner/group,
hidden/system/archive flags etc., i just
need file names and sizes and subfolders).

There is no totally portable way of doing this, but
the POSIX API
(opendir(), readdir() etc) seems to be available on
practically all
Unix-like platforms, as well as some others. (I know
it works on Win32
with MinGW32, but I’m not sure if that’s MinGW32
wrapping the native
Win32 API or not.)

Other than that, there are some libraries that do
this. (The authors of
these will probably post URLs. :slight_smile:

I have one as well (in Kobo Deluxe), but I’ve hardly
been using those
features so far, so I’m not even sure they work well
on Win32, let alone
any other OS. (I’m working exclusively on Linux,
only crosscompiling
Win32 binaries occasionally.)

//David Olofson — Programmer, Reologica
Instruments AB

.- M A I A
-------------------------------------------------.
| Multimedia Application Integration
Architecture |
| A Free/Open Source Plugin API for Professional
Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter | ------------------------------------->
http://olofson.net -’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

I’m not the author so I’m not going to post a URL, but
you can use physfs :slight_smile:

…but I am.

http://icculus.org/physfs/

Might be overkill, depending on what you’re doing.

–ryan.

SDL does not offer this feature, you might look at PhysicsFS or so.On Fri, Apr 19, 2002 at 07:20:56PM +0200, CRV?ADER/KY wrote:

How can I list the contents of a folder, remaining indipendent from the OS I’m running on? (obviously I’m not
interested in OS-dipendent things like permissions, owner/group, hidden/system/archive flags etc., i just need
file names and sizes and subfolders).


Joseph Carter You want fries with that?

libc6 is not essential :expressionless:

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020419/025474ba/attachment.pgp

I’m creating a cards game, in wich:

1)The cards are surfaces that can be dragged with the mouse around a SPECIFIED area of the screen without
annoying the main program
2)The cards must have:
click() event
create(from bitmap) and destroy() functions
3)(If possible) they should be able to reuse the same bitmaps in memory (there are card that are equal to each
other)
4)The cards may be partially put on the top of each other. I must be able to choose wich one stays on top.
5)(If possible) I need to rotate them 90 degrees right/left, realtime.

Are there any libraries that do so or I have to write them myself?
I’m writing the main program in C so it would be great if the library weren’t in C++ (or I’ll have to write a
wrapper, duh)

Thanks

CRV?ADER/KY
KnowledgE is PoweR

You could always download a card game from download.com if you don’t want to
program anything yourself ;-)> ----- Original Message -----

From: crusaderky@inwind.it (CRUSADER//KY)
To:
Sent: Sunday, April 28, 2002 10:09 AM
Subject: [SDL] Cards game

I’m creating a cards game, in wich:

1)The cards are surfaces that can be dragged with the mouse around a
SPECIFIED area of the screen without
annoying the main program
2)The cards must have:
click() event
create(from bitmap) and destroy() functions
3)(If possible) they should be able to reuse the same bitmaps in memory
(there are card that are equal to each
other)
4)The cards may be partially put on the top of each other. I must be able
to choose wich one stays on top.
5)(If possible) I need to rotate them 90 degrees right/left, realtime.

Are there any libraries that do so or I have to write them myself?
I’m writing the main program in C so it would be great if the library
weren’t in C++ (or I’ll have to write a
wrapper, duh)

Thanks

CRV?ADER/KY
KnowledgE is PoweR


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl