Gregory Pakosz
Gregory Pakosz

Reputation: 70234

Metro class library, FileInfo replacement?

In one of our components ported from Java to C#, we used FileInfo as an equivalent for Java's File class.

Now we're working towards making that class library available to Metro applications and we have to pass the certification obviously.

What's a good replacement for FileInfo in .NET Framework 4.5 core profile?

Upvotes: 3

Views: 2564

Answers (2)

Hassan Ahamed
Hassan Ahamed

Reputation: 1

in order to target both win8 platform and silverlight. that is for metro apps and non metro apps in your case just create a shared file project and put in #if conditions. so that it targets for both the platform. have a look in the following link for creating the same

http://www.dotnetjalps.com/2015/02/shared-project-visual-studio-2015.html

Upvotes: 0

dtb
dtb

Reputation: 217351

The StorageFile Class in the Windows.Storage Namespace.

StorageFile class

Represents a file. Provides information about the file and its content, and ways to manipulate them.

Example:

var file = await StorageFile.GetFileFromPathAsync(path);

Upvotes: 4

Related Questions