System.IO.FileSystemWatcher.RunningInstance.WatchedDirectory.GetPath C# (CSharp) Méthode

GetPath() private méthode

Gets the path of this directory.
private GetPath ( bool relativeToRoot, string additionalName = null ) : string
relativeToRoot bool Whether to get a path relative to the root directory being watched, or a full path.
additionalName string An additional name to include in the path, relative to this directory.
Résultat string
                internal string GetPath(bool relativeToRoot, string additionalName = null)
                {
                    // Use our cached builder
                    StringBuilder builder = t_builder;
                    if (builder == null)
                    {
                        t_builder = builder = new StringBuilder();
                    }
                    builder.Clear();

                    // Write the directory's path.  Then if an additional filename was supplied, append it
                    Write(builder, relativeToRoot);
                    if (additionalName != null)
                    {
                        AppendSeparatorIfNeeded(builder);
                        builder.Append(additionalName);
                    }
                    return builder.ToString();
                }
FileSystemWatcher.RunningInstance.WatchedDirectory