Esempio n. 1
0
        public void UpdateShareObjectPathAndName(ShareObject shareObject, String newLocalPathAndName, String newName)
        {
            // Dispose share object at new location
            ShareObject overwriteShareObject;

            if (shareObjectsByLocalPath.TryGetValue(newLocalPathAndName, out overwriteShareObject))
            {
                DisposeShareObject(overwriteShareObject);
            }

            // Update share object with new location
            String oldLocalPathAndName = shareObject.localPathAndName;

            shareObjectsByLocalPath.Remove(shareObject.localPathAndName);

            shareObject.UpdatePathAndName(newLocalPathAndName, newName);
            shareObjectsByLocalPath.Add(newLocalPathAndName, shareObject);

            if (NfsServerLog.sharedFileSystemLogger != null)
            {
                NfsServerLog.sharedFileSystemLogger.WriteLine("[SharedFileSystem] Updated Share Object: '{0}' to '{1}'", oldLocalPathAndName, newLocalPathAndName);
            }
        }