2016-11-13 21:50:23 -07:00
|
|
|
|
using Emby.Common.Implementations.IO;
|
|
|
|
|
using MediaBrowser.Model.Logging;
|
|
|
|
|
using Mono.Unix.Native;
|
2017-03-25 16:13:44 -07:00
|
|
|
|
using MediaBrowser.Model.System;
|
2016-11-13 21:50:23 -07:00
|
|
|
|
|
|
|
|
|
namespace Emby.Server.Mac.Native
|
|
|
|
|
{
|
|
|
|
|
public class MonoFileSystem : ManagedFileSystem
|
|
|
|
|
{
|
2017-03-25 16:13:44 -07:00
|
|
|
|
public MonoFileSystem(ILogger logger, IEnvironmentInfo environmentInfo, string tempPath)
|
|
|
|
|
: base(logger, environmentInfo, tempPath)
|
2016-11-13 21:50:23 -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|