TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Augus tin
NA
166
6.5k
How to check if there is any directory available or not
Dec 7 2018 2:56 AM
Hello Team !
I have strucked from past 4hrs because of this as my question is
How to check if there is any directory available or not
actually i am using a code to check the directory but boolean always return false so i can't predict my logic kindly help me to fix this dear
Here is my code
bool isEmpty = false ;
isEmpty = !Directory.EnumerateFiles(voicefile + "\\").Any(); //check there is an folder
if (isEmpty)
{
foldernamevoice = objdirinfovikramgetfile + "" + getvoicefilesvikramfolder[0];
DirectoryInfo objdirinfovikramgetfilefolderfile = new DirectoryInfo(foldernamevoice);
if (objdirinfovikramgetfilefolderfile.Exists) //if folder exist
{
//get voice file name list
getvoicefilesvikram = objdirinfovikramgetfilefolderfile.GetFiles("*.*").Select(y => y.FullName + "#" + y.Name).Where(s => s.EndsWith(".dss") || s.EndsWith(".ds2") || s.EndsWith(".mp3") || s.EndsWith(".wav") || s.EndsWith(".dct") || s.EndsWith(".m4a") || s.EndsWith(".wma") || s.EndsWith(".DSS") || s.EndsWith(".DS2") || s.EndsWith(".MP3") || s.EndsWith(".WAV") || s.EndsWith(".DCT") || s.EndsWith(".M4A") || s.EndsWith(".WMA"));
folderfile = getvoicefilesvikramfolder[0];
}
}
Reply
Answers (
3
)
mvc using user individual authentication
how to check messages read or not on whatsapp API Using C#