P4Connect.Queries.cs #1

  • //
  • guest/
  • anis_sg/
  • perforce_software/
  • p4connect/
  • src/
  • P4Connect/
  • P4Connect/
  • P4Connect.Queries.cs
  • View
  • Commits
  • Open Download .zip Download (1 KB)
using UnityEditor;
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Perforce.P4;

namespace P4Connect
{
	public class Queries
	{
		/// <summary>
		/// Returns the state of the passed in file
		/// </summary>
		public static FileState GetFileState(string arPath)
		{
			FileState ret = FileState.None;
			if (Utils.IsFilePathValid(arPath))
			{
				Engine.PerformConnectionOperation(con => ret = Engine.GetFileState(arPath, con));
			}
			return ret;
		}

		/// <summary>
		/// Returns the state of the passed in file on the server (if checked out by someone else for instance)
		/// </summary>
		public static RevisionState GetRevisionState(string arPath)
		{
			RevisionState ret = RevisionState.None;
			if (Utils.IsFilePathValid(arPath))
			{
				Engine.PerformConnectionOperation(con => ret = Engine.GetRevisionState(arPath, con));
			}
			return ret;
		}

		/// <summary>
		/// Returns the list of open files
		/// </summary>
		/// <returns></returns>
		//public static List<string> GetAllLocalOpenedFiles()
		//{
		//	List<string> ret = new List<string>();
		//	Engine.PerformOpenConnectionOperation(con => ret.AddRange(ChangeManager.GetInstance.LocalOpenedFiles));
		//	return ret;
		//}
	}
}
# Change User Description Committed
#1 12954 anis_sg Populate -o //guest/perforce_software/p4connect/...
//guest/anis_sg/perforce_software/p4connect/....
//guest/perforce_software/p4connect/src/P4Connect/P4Connect/P4Connect.Queries.cs
#3 12553 Norman Morse integrate from internal main
Build fixes for EC.
Major changes to Configuration and re-initialization code.
Bug fixes
#2 12512 Norman Morse Integrate from Dev branch, preparing for Beta3 release
#1 10940 Norman Morse Inital Workshop release of P4Connect.
Released under BSD-2 license