コード例 #1
0
ファイル: ReadWrite.cs プロジェクト: sky-xk-nge/Unturned
 public static bool fileExists(string path, bool useCloud, bool usePath)
 {
     if (useCloud)
     {
         return(ReadWrite.cloudFileExists(path));
     }
     if (usePath)
     {
         path = ReadWrite.PATH + path;
     }
     return(File.Exists(path));
 }
コード例 #2
0
ファイル: ReadWrite.cs プロジェクト: sky-xk-nge/Unturned
        public static byte[] cloudFileRead(string path)
        {
            if (!ReadWrite.cloudFileExists(path))
            {
                return(null);
            }
            int num;

            Provider.provider.cloudService.getSize(path, out num);
            byte[] array = new byte[num];
            if (!Provider.provider.cloudService.read(path, array))
            {
                Debug.LogError("Failed to read the correct file size.");
                return(null);
            }
            return(array);
        }