DoFileFlagging() 공개 정적인 메소드

public static DoFileFlagging ( string filePath ) : void
filePath string
리턴 void
예제 #1
0
 private static void LogText(string logString)
 {
     File.AppendAllText(GetLogPath(), logString);
     if (new System.IO.FileInfo(GetLogPath()).Length > deleteThreshhold)
     {
         File.Delete(GetLogPath());
     }
     SenseixSession.DoFileFlagging(GetLogPath());
 }
예제 #2
0
        static public void CopyFailsafeOver()
        {
            string failsafeFileName    = "failsafe";
            string failsafeDestination = System.IO.Path.Combine(Application.persistentDataPath, failsafeFileName + SEED_FILE_EXTENSION);

            TextAsset failsafeAsset = Resources.Load <TextAsset>(failsafeFileName);

            byte[] failsafeContents = failsafeAsset.bytes;

            try
            {
                FileStream newFile = System.IO.File.Create(failsafeDestination);
                SenseixSession.DoFileFlagging(failsafeDestination);
                newFile.Close();
                System.IO.File.WriteAllBytes(failsafeDestination, failsafeContents);
            }
            catch
            {
                ThinksyPlugin.ShowEmergencyWindow("An error occurred while creating a failsafe seed file in " + failsafeDestination);
            }
        }
예제 #3
0
        static private void ReplaceSeed(Message.Problem.ProblemGetResponse reply)
        {
            Logger.BasicLog("Replacing seed file.");
            MemoryStream            stream           = new MemoryStream();
            ThinksyProtosSerializer customSerializer = new ThinksyProtosSerializer();

            customSerializer.Serialize(stream, reply);

            byte[] replacementBytes = stream.ToArray();
            try
            {
                FileStream newFile = System.IO.File.Create(PlayerSeedPath());
                SenseixSession.DoFileFlagging(PlayerSeedPath());
                newFile.Close();
            }
            catch
            {
                ThinksyPlugin.ShowEmergencyWindow("An error occurred while creating a seedfile in " + PlayerSeedPath());
            }
            stream.Close();
            System.IO.File.WriteAllBytes(SeedFilePath(), replacementBytes);
            SenseixSession.DoFileFlagging(SeedFilePath());
        }