Example #1
0
        private static string EnforceIsRooted( ZookeeperPsDriverInfo driverInfo, string path )
        {
            if( path.StartsWith( Separator ) )
            {
                return driverInfo.Name + ":" + path;
            }

            return driverInfo.Name + ":" + driverInfo.Root + path;
        }
Example #2
0
        public static string FromZookeeperPath( ZookeeperPsDriverInfo driverInfo, string path )
        {
            var windowsPath = path.Replace(ZookeeperPath.Separator, PsPath.Separator );
            if( !IsRooted( windowsPath ) )
            {
                return EnforceIsRooted( driverInfo, windowsPath );
            }

            return windowsPath;
        }
        public LongNodeRepresentation(
                GetDataResponse data,
                ZookeeperPsDriverInfo driverInfo,
                string path )
        {
            this.path = path;
            this.data = data;

            this.Name = ZookeeperPath.GetItemName( path );
            this.FullName = PsPath.FromZookeeperPath( driverInfo, path );
        }