See if a file is in ROM using c#

  • Thread starter Thread starter ZappB
  • Start date Start date
Z

ZappB

Hi,

In c++ there is a attribute FILE_ATTRIBUTE_INROM, but that (or something
like it) is not part of the FileAttributes Enumeration in C#.

How can I then see if a given FileInfo is in the RAM or ROM on my
smartphone.
 
Have you tried use GetFileAttributes P/Invoke?

if ((GetFileAttributes("path") & FILE_ATTRIBUTE_INROM) > 0) ...

....

const int FILE_ATTRIBUTE_INROM = 0x40

[DllImport("coredll", EntryPoint="GetFileAttributes", SetLastError=true)]
private static extern uint GetFileAttributes(string lpFileName);


Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
Back
Top