Ejemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        internal static SnapshottableDirectoryStatus[] GetSnapshottableDirListing(FSDirectory
                                                                                  fsd, SnapshotManager snapshotManager)
        {
            FSPermissionChecker pc = fsd.GetPermissionChecker();

            fsd.ReadLock();
            try
            {
                string user = pc.IsSuperUser() ? null : pc.GetUser();
                return(snapshotManager.GetSnapshottableDirListing(user));
            }
            finally
            {
                fsd.ReadUnlock();
            }
        }