Exemplo n.º 1
0
        static public bool FileExist(string filename)
        {
            DM_FILE_ATTRIBUTES att = new DM_FILE_ATTRIBUTES();

            XboxGetFileAttributes(filename, ref att);
            if (att.ChangeTime.dwHighDateTime != 0 ||
                att.ChangeTime.dwLowDateTime != 0 ||
                att.CreationTime.dwHighDateTime != 0 ||
                att.CreationTime.dwLowDateTime != 0 ||
                att.SizeHigh > 0 ||
                att.SizeLow > 0
                )
            {
                return(true);
            }


            return(false);
            //return (att.SizeHigh != 0 && att.SizeLow != 0);

            //bool exist = XboxFileExist(filename);
            //return exist;
        }
Exemplo n.º 2
0
 static extern bool XboxGetFileAttributes(string name, ref DM_FILE_ATTRIBUTES pAttributes);
Exemplo n.º 3
0
 static public bool GetFileAttributes(string name, ref DM_FILE_ATTRIBUTES pAttributes)
 {
     XboxGetFileAttributes(name, ref pAttributes);
     return(Marshal.GetLastWin32Error() != 0);
 }