Files

  • Thread starter Thread starter Saradhi
  • Start date Start date
S

Saradhi

Hi Group,

I want to know about the following things:

1) I want to check whther a folder is is a local folder or on a network drive and that the user has read/write permissions to that folder or not??

2) I wanted to check whther a file is a binary one or not?

Can you provide some C# sample code to acieve the above things??
 
Saradhi said:
2) I wanted to check whther a file is a binary one or not?

What exactly do you mean by this? *Every* file is binary in that it's a
sequence of bytes - and every file is text in that it could be
interpreted as text (e.g. in Cp1252). Whether or not it was written as
text using an appropriate encoding is unknowable.
 
I may not be clear in my question.
I wanted to check whther the file is a RESX file or not

Jon Skeet said:
2) I wanted to check whther a file is a binary one or not?

What exactly do you mean by this? *Every* file is binary in that it's a
sequence of bytes - and every file is text in that it could be
interpreted as text (e.g. in Cp1252). Whether or not it was written as
text using an appropriate encoding is unknowable.
 
Saradhi said:
I may not be clear in my question.
I wanted to check whther the file is a RESX file or not

Does looking at the extension not give you a good enough idea?
 
Back
Top