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(con.LocalOpenedFiles)); return ret; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12290 | geekstress |
Branching //guest/perforce_software/p4connect/... to //guest/geekstress/dev/p4connect/... |
||
//guest/perforce_software/p4connect/src/P4Connect/P4Connect/P4Connect.Queries.cs | |||||
#1 | 10940 | Norman Morse |
Inital Workshop release of P4Connect. Released under BSD-2 license |