#How to detect path is folder/file

1 messages · Page 1 of 1 (latest)

zealous bluff
#

I'm using Tauri - Svelte

mint hill
#

idk the proper way, but I'm just checking if the file has children

#

ig that wouldnt work for empty folders

#

you could check to see if maybe folders have an empty children array, whereas for files its undefined? Im not sure though

limpid radish
#

Idk if it has the is folder function is on javascript though

zealous bluff
#

Can what SurprisedPika wrote work ?

limpid radish
#

its what it meant to do

zealous bluff
zealous bluff
limpid radish
mint hill
#

incase its not clear i was also using fs

zealous bluff
limpid radish
#

Whatever 🤷‍♂️

mint hill
#

presumably they are using fs to get the entry

limpid radish
#

you literally have a function for that

#

the is_directory

zealous bluff
limpid radish
#

my bad

#

is the PATH thing in rust

#

not fs

zealous bluff
limpid radish
#

just invoke the function then

limpid radish
zealous bluff
limpid radish
#

you will need this sooner or later (probably)

zealous bluff
#

Thanks, have a nice day 🙂