예제 #1
0
        public static void WriteBytes(byte[] vs, string filePath, FileOperater operater = default)
        {
            FileOperater    fileOperater    = (operater == null) ? new FileOperater() : operater;
            FileCommandInfo fileCommandInfo = new FileCommandInfo
            {
                FileFullName = filePath,
                FileReadType = FileCommandInfo.FileCommandInfoReadType.Bytes,
                DataBytes    = vs
            };

            fileOperater.WriteFile(ref fileCommandInfo);
            fileCommandInfo.Dispose();
        }
예제 #2
0
        public static void WriteUTF8Text(string content, string filePath, FileOperater operater = default)
        {
            FileOperater    fileOperater    = (operater == null) ? new FileOperater() : operater;
            FileCommandInfo fileCommandInfo = new FileCommandInfo
            {
                FileFullName = filePath,
                FileReadType = FileCommandInfo.FileCommandInfoReadType.Bytes,
                DataBytes    = Encoding.UTF8.GetBytes(content)
            };

            fileOperater.WriteFile(ref fileCommandInfo);
            fileCommandInfo.Dispose();
        }