Пример #1
0
        public FileItem LocalToRemoteFileItem(FileItem LocalFileItem, bool bShouldUpload)
        {
            FileItem RemoteFileItem = null;

            // Look to see if we've already made a remote FileItem for this local FileItem
            if (!CachedRemoteFileItems.TryGetValue(LocalFileItem, out RemoteFileItem))
            {
                // If not, create it now
                string RemoteFilePath = ConvertPath(LocalFileItem.AbsolutePath);
                RemoteFileItem = FileItem.GetRemoteItemByPath(RemoteFilePath, RemoteToolChainPlatform);

                // Is shadowing requested?
                if (bShouldUpload)
                {
                    QueueFileForBatchUpload(LocalFileItem);
                }

                CachedRemoteFileItems.Add(LocalFileItem, RemoteFileItem);
            }

            return(RemoteFileItem);
        }