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

22 lines
875 B
C#
Raw Normal View History

2016-11-11 07:24:36 +00:00
using Emby.Common.Implementations.IO;
using MediaBrowser.Model.Logging;
using Mono.Unix.Native;
namespace MediaBrowser.Server.Mono.Native
{
public class MonoFileSystem : ManagedFileSystem
{
2016-11-13 04:33:51 +00:00
public MonoFileSystem(ILogger logger, bool supportsAsyncFileStreams, bool enableManagedInvalidFileNameChars) : base(logger, supportsAsyncFileStreams, enableManagedInvalidFileNameChars, false)
2016-11-11 07:24:36 +00: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);
}
}
}