NekoKun.StorageManager.GetUserDirectory C# (CSharp) Method

GetUserDirectory() public static method

public static GetUserDirectory ( string storageCategory ) : string
storageCategory string
return string
        public static string GetUserDirectory(string storageCategory)
        {
            string path = System.IO.Path.Combine(userDirectory, storageCategory);
            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(path);
            }
            return path;
        }

Usage Example

Example #1
0
 void FillFields()
 {
     this.fieldName.Text     = StorageManager.GetNextName(StorageManager.GetUserDirectory("Projects"), "Project{0}");
     this.fieldLocation.Text = System.IO.Path.Combine(
         StorageManager.GetUserDirectory("Projects"),
         invalidChars.Replace(this.fieldName.Text, "")
         );
 }
All Usage Examples Of NekoKun.StorageManager::GetUserDirectory