x


build error: error CS1061: Type System.IO.DirectoryInfo 'does not Contain a definition ...'

I create xml containing data. To be sure the name of the xml does not exist, I look at the number of files in the folder and I add this to the end:

private ArrayList tabNameOfXML;
public string ReadDirectory () {
string path = @ Application.dataPath + "/ Media /";
DirectoryInfo info = new DirectoryInfo (path);
FileInfo [] = info.GetFiles FileInfo ();
int cpt = -1;
foreach (FileInfo file in FileInfo)
{
cpt + +;
}
string refname = "soft" cpt;//+". + xml ";
return refname;
}

Read "standalone" everything works but if I try to do a "build" for the web, I go out an error like this:

Assets / Standard Assets / Scripts / Utility Scripts / XML / WriteInXML.cs (128.40): error CS1061: Type System.IO.DirectoryInfo 'does not Contain a definition for GetFiles' and no extension method GetFiles' type ofSystem.IO.DirectoryInfo 'Could Be found (are you missing a using directive or assembly reference year?)

more ▼

asked Dec 27 '11 at 05:20 PM

Kalu gravatar image

Kalu
59 18 21 22

(comments are locked)
10|3000 characters needed characters left

0 answers: sort newest

Webplayers do not support any kind of local file IO for security reasons.

more ▼

answered Dec 27 '11 at 06:16 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

should I use a database to store data and be able to access and count?

Dec 27 '11 at 07:20 PM Kalu

As long as the database is being run off a web server.

Dec 27 '11 at 07:40 PM Eric5h5

it's okay! rules with database!

Dec 31 '11 at 12:47 AM Kalu
(comments are locked)
10|3000 characters needed characters left
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1949
x255

asked: Dec 27 '11 at 05:20 PM

Seen: 1771 times

Last Updated: Jul 16 '12 at 07:57 PM