ACR_ServerCommunicator.ModuleContentPatcher.ContentPatchFileStoreFileExists C# (CSharp) Method

ContentPatchFileStoreFileExists() private static method

Check if a file store file exists.
private static ContentPatchFileStoreFileExists ( string FileStorePath, string ConnectionString ) : bool
FileStorePath string Supplies the remote file name that /// designates the file to check for existance.
ConnectionString string Supplies the file store connection /// string.
return bool
        private static bool ContentPatchFileStoreFileExists(string FileStorePath, string ConnectionString)
        {
            if (String.IsNullOrEmpty(ConnectionString))
                return false;

            //
            // Initialize the file store provider.
            //

            FileStore UpdaterStore = FileStoreProvider.CreateAzureFileStore(ConnectionString);
            FileStoreContainer UpdaterContainer = UpdaterStore.GetContainerReference(FileStoreNamespace.ACRUpdater);
            FileStoreFile UpdaterFile = UpdaterContainer.GetFileReference(FileStorePath + ".gzip");

            try
            {
                if (UpdaterFile.Exists())
                    return true;
            }
            catch
            {
            }

            UpdaterFile = UpdaterContainer.GetFileReference(FileStorePath);

            try
            {
                if (UpdaterFile.Exists())
                    return true;
            }
            catch
            {
            }

            return false;
        }
    }