FileStore.FileStore.GetSubfolders C# (CSharp) Méthode

GetSubfolders() public méthode

Gets a string array of the subfolders in the given folder.
public GetSubfolders ( string path ) : string[]
path string The folder path.
Résultat string[]
        public string[] GetSubfolders(string path)
        {
            if(path == null) {
                throw new ArgumentNullException("path");
            }

            StoreFolder folder = GetFolder(path);

            if(folder != null) {
                string[] folders = new string[folder.Subfolders.Count];

                for(int i = 0; i < folder.Subfolders.Count; i++) {
                    folders[i] = folder.Subfolders.Keys[i];
                }

                return folders;
            }

            return null;
        }