mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-20 15:54:38 +00:00
Unwrapped all /(Write|Read)All(Text|Bytes)/ functions.
This commit is contained in:
parent
581a7fe078
commit
b9a111432a
17 changed files with 36 additions and 29 deletions
|
|
@ -210,7 +210,8 @@ namespace Emby.Server.Implementations.AppBase
|
|||
{
|
||||
var file = Path.Combine(path, Guid.NewGuid().ToString());
|
||||
|
||||
FileSystem.WriteAllText(file, string.Empty);
|
||||
string text = string.Empty;
|
||||
File.WriteAllText(file, text);
|
||||
FileSystem.DeleteFile(file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.AppBase
|
|||
// Use try/catch to avoid the extra file system lookup using File.Exists
|
||||
try
|
||||
{
|
||||
buffer = fileSystem.ReadAllBytes(path);
|
||||
buffer = File.ReadAllBytes(path);
|
||||
|
||||
configuration = xmlSerializer.DeserializeFromBytes(type, buffer);
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ namespace Emby.Server.Implementations.AppBase
|
|||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
// Save it after load in case we got new items
|
||||
fileSystem.WriteAllBytes(path, newBytes);
|
||||
File.WriteAllBytes(path, newBytes);
|
||||
}
|
||||
|
||||
return configuration;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue