private readonly string mountMetadataPath; // ../work/mountMetadata/ public VolumeMap(ServiceContext serviceContext) { this.rwLock = new ReaderWriterLockSlim(); this.knownVolumeMappings = new Dictionary <string, VolumeEntry>(); this.serviceContext = serviceContext; this.mountPointBase = Path.Combine(this.serviceContext.CodePackageActivationContext.WorkDirectory, Constants.Mounts); Utilities.EnsureFolder(this.mountPointBase); this.volumesMetadataPath = Path.Combine(this.serviceContext.CodePackageActivationContext.WorkDirectory, volumesMetadata); Utilities.EnsureFolder(volumesMetadataPath); this.mountMetadataPath = Path.Combine(this.serviceContext.CodePackageActivationContext.WorkDirectory, mountMetadata); Utilities.EnsureFolder(mountMetadataPath); var os = Utilities.GetOperatingSystem(this.serviceContext.CodePackageActivationContext); this.mountManager = (os == AzureFilesVolumePluginSupportedOs.Linux) ? (IMountManager)(new LinuxMountManager( this.mountPointBase, this.serviceContext.CodePackageActivationContext.WorkDirectory)) : (IMountManager)(new WindowsMountManager(this.mountPointBase)); this.Initialize(); }
public Dictionary <int, int> Mountattrs = new Dictionary <int, int>(); //坐骑所提供的属性列表 static MountManager() { LogicServer.Instance.UpdateManager.InitStaticImpl(typeof(MountManager), typeof(MountManagerDefaultImpl), o => { mStaticImpl = (IMountManager)o; }); }