コード例 #1
0
ファイル: FileTools.cs プロジェクト: dlebansais/Wrist
        public static bool CommitBinaryFile(string fileName, byte[] content)
        {
            bool Success = SaveToIsolatedStorageFile(ToISFileName(fileName), content);

            if (Success)
            {
                Bookkeeping.CreateFile(fileName);
            }

            return(Success);
        }
コード例 #2
0
ファイル: FileTools.cs プロジェクト: dlebansais/Wrist
        public static void CopyFile(string sourceFileName, string destinationFileName)
        {
            Bookkeeping.CreateFile(destinationFileName);

            string Source      = ToISFileName(sourceFileName);
            string Destination = ToISFileName(destinationFileName);

            if (IsolatedStorageFileExists(Source))
            {
                CopyIsolatedStorageFile(Source, Destination, out bool success);
            }
        }
コード例 #3
0
ファイル: FileTools.cs プロジェクト: dlebansais/Wrist
        public static bool CommitTextFile(string fileName, string content)
        {
            byte[] bytes = (content == null) ? null : Encoding.UTF8.GetBytes(content);

            bool Success = SaveToIsolatedStorageFile(ToISFileName(fileName), bytes);

            if (Success)
            {
                Bookkeeping.CreateFile(fileName);
            }

            return(Success);
        }