jellyfin/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs

24 lines
976 B
C#
Raw Normal View History

using Emby.Server.Implementations.IO;
2016-11-11 00:24:36 -07:00
using MediaBrowser.Model.Logging;
2017-03-10 12:51:29 -07:00
using MediaBrowser.Model.System;
2016-11-11 00:24:36 -07:00
using Mono.Unix.Native;
namespace MediaBrowser.Server.Mono.Native
{
public class MonoFileSystem : ManagedFileSystem
{
2018-09-12 10:26:21 -07:00
public MonoFileSystem(ILogger logger, IEnvironmentInfo environment, string defaultDirectory, string tempPath, bool enableSeperateFileAndDirectoryQueries)
: base(logger, environment,defaultDirectory, tempPath, enableSeperateFileAndDirectoryQueries)
2016-11-11 00:24:36 -07:00
{
}
public override void SetExecutable(string path)
{
// Linux: File permission to 666, and user's execute bit
Logger.Info("Syscall.chmod {0} FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH", path);
Syscall.chmod(path, FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH);
}
}
}