コード例 #1
0
		string DescribeFiles (IFile[] files)
		{
			var msg = "";
			if (files.Length == 1) {
				msg = files [0].IsDirectory ? "Folder" : App.DocumentBaseName;
			} else {
				var ndir = files.Count (x => x.IsDirectory);
				var ndoc = files.Length - ndir;
				var head = "";
				if (ndoc > 0) {
					msg = ndoc + " " + (ndoc > 1 ? App.DocumentBaseNamePluralized : App.DocumentBaseName);
					head = ", ";
				}
				if (ndir > 0) {
					msg += head + ndir + (ndir > 1 ? " Folders" : " Folder");
				}
			}
			return msg;
		}