Esempio n. 1
0
 public void GetFolderPath_OSX_NonEmptyFolderPaths(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     Assert.NotEmpty(Environment.GetFolderPath(folder, option));
     if (option == Environment.SpecialFolderOption.None)
     {
         Assert.NotEmpty(Environment.GetFolderPath(folder));
     }
 }
Esempio n. 2
0
 public void GetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 => Environment.GetFolderPath(folder, option);
Esempio n. 3
0
 public static extern string GetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option);
 /// <summary>Creates a <see cref="DirectoryInfo"/> from a given <see cref="Environment.SpecialFolder"/> by utilising <see cref="Environment.GetFolderPath(Environment.SpecialFolder)"/>. </summary>
 /// <param name="SpecialFolder">The special folder.</param>
 /// <param name="Option">The option.</param>
 /// <returns><see cref="DirectoryInfo"/></returns>
 public static DirectoryInfo GetDirectoryInfo(this Environment.SpecialFolder SpecialFolder, Environment.SpecialFolderOption Option) => new DirectoryInfo(Environment.GetFolderPath(SpecialFolder, Option));
Esempio n. 5
0
 /// <summary>
 /// Gets the path to the system special folder that is identified by the specified enumeration.
 /// </summary>
 /// <param name="folder">An enumerated constant that identifies a system special folder.</param>
 /// <param name="option">Specifies options to use for accessing a special folder.</param>
 /// <returns>The path to the specified system special folder, if that folder physically
 /// exists on your computer; otherwise, an empty string ("").A folder will not
 /// physically exist if the operating system did not create it, the existing
 /// folder was deleted, or the folder is a virtual directory, such as My Computer,
 /// which does not correspond to a physical path.</returns>
 public static string GetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     return(Environment.GetFolderPath(folder, option));
 }
 public abstract string GetFolderPath(Environment.SpecialFolder specialFolder, Environment.SpecialFolderOption specialFolderOption);
Esempio n. 7
0
 public static string GetPath(this Environment.SpecialFolder specialFolder, Environment.SpecialFolderOption option = Environment.SpecialFolderOption.None)
 {
     return(Environment.GetFolderPath(specialFolder, option));
 }
Esempio n. 8
0
 public override void BeginGetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     base.BeginGetFolderPath(folder, option);
 }
Esempio n. 9
0
 public override void EndGetFolderPath(string result, Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     base.EndGetFolderPath(result, folder, option);
 }
Esempio n. 10
0
 public virtual void EndGetFolderPath(string result, Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
 }
Esempio n. 11
0
 public virtual void FailGetFolderPath(ref Exception exception, Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
 }
Esempio n. 12
0
 public virtual void BeginGetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
 }
 public static string GetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     return(default(string));
 }
Esempio n. 14
0
 /// <summary>
 /// Gets the path to the system special folder that is identified by the specified enumeration, and uses a specified option for accessing special folders
 /// </summary>
 /// <param name="folder">An enumerated constant that identifies a system special folder</param>
 /// <param name="option">Specifies options to use for accessing a special folder</param>
 /// <returns>The path to the specified system special folder, if that folder physically exists on your computer; otherwise, an empty string ("").A folder will not physically exist if the operating system did not create it, the existing folder was deleted, or the folder is a virtual directory, such as My Computer, which does not correspond to a physical path.</returns>
 public static FileSystemPath GetFolderPath(this Environment.SpecialFolder folder, Environment.SpecialFolderOption option = Environment.SpecialFolderOption.None)
 {
     return(Environment.GetFolderPath(folder, option));
 }
Esempio n. 15
0
 public string GetFolderPath(Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
 {
     throw new NotImplementedException();
 }
Esempio n. 16
0
 /// <summary>An Environment.SpecialFolder extension method that gets folder path.</summary>
 /// <param name="this">this.</param>
 /// <param name="option">The option.</param>
 /// <returns>The folder path.</returns>
 public static string GetFolderPath(this Environment.SpecialFolder @this, Environment.SpecialFolderOption option)
 {
     return(Environment.GetFolderPath(@this, option));
 }
 public static ZlpDirectoryInfo GetFolderPath(
     Environment.SpecialFolder specialFolder,
     Environment.SpecialFolderOption option)
 {
     return(new ZlpDirectoryInfo(Environment.GetFolderPath(specialFolder, option)));
 }
Esempio n. 18
0
 /// <summary>
 /// 获取特殊文件夹路径,等价于<see cref="Environment.GetFolderPath(Environment.SpecialFolder, Environment.SpecialFolderOption)"/>
 /// </summary>
 /// <param name="specialFolder"></param>
 /// <param name="folderOption"></param>
 /// <returns></returns>
 public static string GetSpecialFolder(Environment.SpecialFolder specialFolder, Environment.SpecialFolderOption folderOption)
 {
     return(Environment.GetFolderPath(specialFolder, folderOption));
 }