Try using the [hcs/stat] object.

.hc

On Jun 20, 2011, at 1:08 PM, Ingo wrote:

You could first write any kind of file into the directory first. Then get the directory content but ignore the file you just wrote - maybe even delete
it afterwards.

Ingo


-----Ursprüngliche Nachricht-----
Von: pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] Im Auftrag von
Matteo Sisti Sette
Gesendet: Montag, 20. Juni 2011 18:37
An: PD-List
Betreff: [PD] Testing whether a directory is empty without printing error
messages if it is

Hi,

I'm using [folder_list] to perform the following tasks:
- check whether a directory or file exists
- get the list of files in a directory (which is an empty list if the
directory is empty)

However, when the file does not exist or the directory of which I'm
getting the list is empty, it prints an error message on the console.
The test works, but I need to avoid printing error messages when there's
no error to worry about.

Is there another way of getting a directory list without printing an
error message to the console if the list is empty?

Thanks
m.

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list



----------------------------------------------------------------------------

The arc of history bends towards justice. - Dr. Martin Luther King, Jr.



_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to