GitScc.DataServices.RepositoryGraph.GetFileContent C# (CSharp) Method

GetFileContent() public method

public GetFileContent ( string commitId, string fileName ) : byte[]
commitId string
fileName string
return byte[]
        public byte[] GetFileContent(string commitId, string fileName)
        {
            try
            {
                var tmpFileName = GetFile(commitId, fileName);
                var content = File.ReadAllBytes(tmpFileName);
                if (File.Exists(tmpFileName)) File.Delete(tmpFileName);
                return content;
            }
            catch (Exception ex)
            {
                Log.WriteLine("Repository.GetFileContent: {0} - {1}\r\n{2}", commitId, fileName, ex.ToString());
            }

            return null;
        }