Exemple #1
0
    IEnumerator GetFileLists_internal(string Id, funcResult callback)
    {
        var listFiles = _drive.ListFolders(Id);

        yield return(StartCoroutine(listFiles));

        var files = GoogleDrive.GetResult <List <GoogleDrive.File> >(listFiles);

        recentFolderID = Id;
        //parentFolderID = _filesDictionary [removedLastWhiteSpace].Parents [0];

        if (files != null)
        {
            _filesDictionary.Clear();
            foreach (GoogleDrive.File file in files)
            {
                                #if UNITY_EDITOR
                Debug.Log(file);
                                #endif
                if (_filesDictionary.ContainsKey(file.Title))
                {
                    //Ignores Duplicated files
                                        #if UNITY_EDITOR
                    Debug.Log(file.Title);
                                        #endif
                }
                else
                {
                    _filesDictionary.Add(file.Title, file);

                    if (file.IsFolder == true)
                    {
                        parentFolderID = file.Parents [0];
                    }
                }
            }
            callback();
        }
                #if UNITY_EDITOR
        Debug.Log(files);
                #endif
    }
	IEnumerator GetFileLists_internal(string Id, funcResult callback){
		var listFiles = _drive.ListFolders(Id);
		yield return StartCoroutine(listFiles);
		var files = GoogleDrive.GetResult<List<GoogleDrive.File>>(listFiles);

		recentFolderID = Id;
		//parentFolderID = _filesDictionary [removedLastWhiteSpace].Parents [0];

		if (files != null){
			_filesDictionary.Clear ();
			foreach (GoogleDrive.File file in files){
				#if UNITY_EDITOR
				Debug.Log (file);
				#endif
				if (_filesDictionary.ContainsKey (file.Title)) {
					//Ignores Duplicated files 
					#if UNITY_EDITOR
					Debug.Log (file.Title);
					#endif
				} else {
					_filesDictionary.Add (file.Title, file);

					if (file.IsFolder == true) {
						parentFolderID = file.Parents [0];
					}
				}
			}
			callback ();
		}
		#if UNITY_EDITOR
		Debug.Log (files);
		#endif
	}