Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading.Tasks;
- namespace FunctionLibrary
- {
- /*Made by AlexDev. Modified By Immune*/
- public class Functions
- {
- public string DownloadString(string Url)
- {
- using (var Client = new WebClient())
- {
- return Client.DownloadString(Url);
- }
- return null;
- }
- public void DownloadFile(string Url, string Name)
- {
- using (var Client = new WebClient())
- {
- Client.DownloadFile(Url, $"{Environment.CurrentDirectory}\\{Name}");
- }
- }
- public void MakeFolder(string FileName)
- => File.Create($"{Environment.CurrentDirectory}\\{FileName}");
- public string ReadFile(string FileLocation)
- {
- return File.ReadAllText(FileLocation);
- }
- public void WriteFile(string Name, string Text)
- => File.WriteAllText(Name, Text); /* Might Be Backwards Since Pastebin Has No Syntax*/
- public void MakeFile(string Name, string Text)
- {
- using (var Writer = new StreamWriter(Name)
- {
- Writer.WriteLine(Text);
- Writer.Close();
- }
- }
- void StartProgram(string FileLocation)
- => Process.Start(FileLocation);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement